Solved

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

Posted on 2003-12-04
4
210 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

623 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