Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 213
  • Last Modified:

How to get PHP4 module to recognize files ending in .html?

My ISP offers PHP 3.0.18 as CGI and PHP 4.x as a module. They told me that if I want to upgrade to 4.x, to just delete the AddType line from my .htaccess file. Here's my current .htaccess file:

IndexIgnore *
DirectoryIndex index.html index.php index.php3
AddType application/x-httpd-php3 .html .php .php3

I deleted the line, and sure enough when I opened a test file containing <? phpinfo(); ?>, it was version 4.

My problem is that all my PHP files end in the .html suffix, not .php, and I want to keep it that way, since I don't want to change all the names and file references, and I just like having my users see normal looking file names. I tried changing the AddType declaration to php4, and it didn't work.

My question: What do I put in my .htaccess file that will allow me to upgrade to PHP 4 module, but still use .html as the file suffix for PHP files?
0
mschrimsher
Asked:
mschrimsher
1 Solution
 
aolXFTCommented:
AddType application/x-httpd-php .php .html

Should do the trick.
0
 
mschrimsherAuthor Commented:
Thanks! It worked like a charm. I added

          AddType application/x-httpd-php3 .php3

also, and I can use both versions!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now