Link to home
Start Free TrialLog in
Avatar of zip123
zip123

asked on

.cgi extension or not

I need a script to run without the.cgi extension as other
websites point to this script.

Can I ask if it is at all possible to tweak the apache config to excecute all cgi-bin content (ie. whether is has a .cgi extension or not).

Is this possible?
Avatar of Aheib
Aheib

Hi Zip123

By default, apache will assume that every file in your cgi-dir is a CGI program, and will attempt to execute it. Even if the extension is left out. So I guess there's no extra tweaking required.

Also because of this, it makes no difference if your script has a .cgi extension or not, when other websites point to your script. It will work any way.

For more info, you can also check your apache documentation, where things are documented pretty clear:
http://localhost/manual/howto/cgi.html
(assuming you're running a version of apache on your own box)
extra:
http://httpd.apache.org/docs/howto/cgi.html#scriptalias
that's the link to the particular part on executing cgi files
Avatar of zip123

ASKER

Thanks for that but:-

Without the extension the file it just showing the text of the script!
ASKER CERTIFIED SOLUTION
Avatar of Aheib
Aheib

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial