Solved

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

Posted on 2003-12-04
4
200 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Permalink issue in Wordpress archive 1 33
PHP/Magento not logging 2 35
PHP7 and Sql Server Windows 2008 R2 13 86
Bootstrap collapse causes odd behavior with php loop 7 24
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
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…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

920 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now