Solved

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

Posted on 2003-12-04
4
207 Views
Last Modified: 2008-07-03
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
Comment
Question by:mschrimsher
4 Comments
 
LVL 6

Accepted Solution

by:
aolXFT earned 250 total points
ID: 9875926
AddType application/x-httpd-php .php .html

Should do the trick.
0
 

Author Comment

by:mschrimsher
ID: 9878543
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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question