I have a legacy program that I need to run with the extension of .cgi (search.cgi), but I have re-written this code using PHP.
How do I tell Apache to reference search.cgi but make it run search.php?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the url rewriting mod of apache.
Somthing like
You can change search.cgi by ixsearch.cgi
Or more general
That will rewrite any url yourdomain.com/{some_scriptname}.cgi in yourdomain.com/{some_scriptname}.php (and rewriting the request GET parameter thanks to QSA clause)
the script name can contain any letter between a and z or numer or char like – or _ (ex tomato-juice). Plus it is case insensitive (thanks to NC clause)