Forum Moderators: phranque

Message Too Old, No Replies

parsing php in .html files

         

RammsteinNicCage

1:51 pm on May 2, 2004 (gmt 0)

10+ Year Member



I'd like to parse php in .html files. I was originally using AddType application/x-httpd-php .htm .html .php in a .htaccess file, but I'm moving to a new host that uses suEXEC so php runs in cgi. They said that I'm going to have to run my files as .php files. Is there anyway around this?

Jennifer

Hanu

2:33 pm on May 2, 2004 (gmt 0)

10+ Year Member



Maybe you can use mod_rewrite.

RammsteinNicCage

3:35 pm on May 2, 2004 (gmt 0)

10+ Year Member



I'm not even sure if that is possible with this cgi thingy (I know nothing about this type of stuff :) ). Is it possible?

Jennifer

willybfriendly

3:37 pm on May 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Look at this thread and you might reconsider the change in hosts

[webmasterworld.com...]

It would appear that there are a number of advantages to having PHP as a module.

WBF

Hanu

7:42 pm on May 2, 2004 (gmt 0)

10+ Year Member



mod_rewrite maps urls of incoming requests (external urls) to internal urls. I googled for 'mod_rewrite php' and found a few promising hints. I don't think it depends on whether php runs as a module or as a cgi. In Apache, url rewriting happens before either the PHP executable is invoked or the php module is handed the request. You should read the mod_rewrite doc and do a quick test on your host.