Help - Search - Members - Calendar
Full Version: How to setup alias to cgi-bin
The Planet Forums > Control Panels > cPanel/WHM
dogslife
I have a perl program I want to leave in the cgi-bin, but run the program from http://mysite.com/support/ , and I want the directory to look like it's still http://mysite.com/support/ . In other words I don't want to redirect.

I remember seeing something using .htaccess in a thread in this forum before, but I can't find the thread (might have something to do with my search string or the 5 million post) icon_smile.gif

Can anyone help me out?

Thanks
dogslife
< bump >

Anyone who can point me at a thread?

icon_smile.gif
eth00
Not sure how you do it with .htaccess (it is probably possible) but you should be able to do it via apache.

Example:
ScriptAlias /cgi-bin/ /home/eth0/public_html/cgi-bin/

So if you want it to run in support you could do

ScriptAlias /support/ /home/eth0/public_html/cgi-bin/

That might work, you may also have to use just a regular "Alias" vs "ScriptAlias"

Using one of those you can probably get this to work.
dogslife
Thanks John!

I'm not sure about the .htaccess either, but you where dead on with apache. I added the line:

ScriptAlias /support/ /home/mysite/public_html/cgi-bin/

To httpd.conf file in the virtualhost area for the site, restarted apache, and it worked perfectly.

I would like to know how to do this at the .htaccess level if anyone has a clue. If you don't get the syntax right in that file, you get a nasty little error 500.

Thanks again.

:)mike
eth00
I stay away from all the .htaccess stuff, luckily primarily doing admin work I can icon_smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.