Forum Moderators: coopster

Message Too Old, No Replies

Can I parse a .cgi file as php?

         

Patrick Taylor

10:08 pm on Jun 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My .htaccess file contains:


AddHandler x-httpd-php .html .htm

Most of my pages have a .php file extension but one or two are .htm, which contain some php, hence the above line.

I have a file with a .cgi extension, which also contains some php but isn't being parsed as such - is there a line I can put in my .htaccess file to make it so?

Patrick

mcibor

10:00 am on Jun 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just add that to it:

AddHandler x-httpd-php .html .htm .cgi

This line shows apache what files to parse.

Patrick Taylor

10:04 pm on Jun 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for the reply. Doing that, though, had pretty drastic results! The whole page blew apart. It seems the perl code (my cgi files are a third party search engine I have installed on my site in the cgi-bin) did not like it.

Patrick