View Full Version : Parsing PHP in HTML
04-03-2007, 06:28 PM
There's tonnes of information available on this subject and every single page I go to I've been told to place the following in .htaccess:
AddType application/x-httpd-php .php .html .htm
The problem is, for me that doesn't seem to enable PHP parsing, it causes the browser (both Firefox and IE) to force a download prompt! Could this be something to do with my server? If so, are there any alternative methods?
04-03-2007, 06:38 PM
Hmm I tried adding that to my .htaccess file and I get a 500 error on my apache server. I guess it has to do with your server settings. How many pages do you have that you want to make dynamic?
04-03-2007, 07:17 PM
would it not be simpler to just save them as php files?
If your hosts offer cpanel you can set your server to parse html pages as php through a nice gui interface
04-04-2007, 09:42 AM
It would indeed be simpler, but my client has dictated that they want the site to remain as .html, but they'd also happen to like some of the functionality of PHP - so, it will be the whole site of around 30 pages.
Oh well, guess they're going to have to choose :)
04-04-2007, 02:17 PM
First thing I would do is find out why they want to keep the site as .html - then explain why they're being completely stupid and clueless ;)
If they still insist on keeping the .html extention after you've explained that the file extention makes no difference etc then you could try doing a mod rewrite to rewrite the .html uris to direct to .php pages
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.