.cgi extension or not

Posted on 2003-02-24
Medium Priority
Last Modified: 2013-12-25
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?
Question by:zip123
  • 3

Expert Comment

ID: 8010321
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:
(assuming you're running a version of apache on your own box)

Expert Comment

ID: 8010336
that's the link to the particular part on executing cgi files

Author Comment

ID: 8010462
Thanks for that but:-

Without the extension the file it just showing the text of the script!

Accepted Solution

Aheib earned 225 total points
ID: 8010564
hmm.. in that case your host did change the config of apache. It shouldn't be too difficult for them to change it so all the files are being executed.
But please do tell, why do you want to drop the .cgi extension? If it's because other websites link to the script, then you might as well keep it, since that shouldn't matter at all.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
This article will show, step by step, how to integrate R code into a R Sweave document
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question