Forum Moderators: phranque

Message Too Old, No Replies

Trying to process .PHP & .HTM files as PHP

Process files PHP

         

jpmadmin

8:49 pm on Jan 3, 2012 (gmt 0)

10+ Year Member



I have this line in my .htaccess files (identical .htaccess file on 2 distinct Domains):

# Process .php, .htm, and .html files as PHP
AddType application/x-httpd-php .php .htm .html


It works on a .COM Domain, however not on a .CO Domain.

What could be missing ?

g1smd

9:34 pm on Jan 3, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Sometimes you need AddHandler rather than AddType. There may be other settings that you need to alter.

If you can't get parsing of .html files as PHP working, try a different approach.

Name the files on the server as .php, continue linking to your pages with .html references in the href, and then set up a rewrite so that requests for .html URLs are serviced by the .php files.

phranque

3:07 am on Jan 4, 2012 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



perhaps mod_mime has been removed from the base configuration for your .co server.