Do normal PHP pages work for you?
If not is your server PHP enabled?
If PHP is enabled then the following on its own should work:
AddType application/x-httpd-php .html
drop the rewrite rule though, you shouldn't need that
Hi,
I have been playing around with PHP codes inside HTML files but can't get it to work.
I have been trying every thing i found in Webmaster World, specialy adding the following in my .htaccess file :
AddType application/x-httpd-php .php .php3 .phtml .html
Tried with the code above and together with the code below.
RewriteEngine On
RewriteRule ^entry_(.*)\.html$ /entry.php?show=$1 [L]
When i try to load the page/site it prompts me to save as.
Basically i like to keep HTML pages and at the same time be able to use some PHP includes.
Any help appreciated.
Thanks in advance.
Do normal PHP pages work for you?
If not is your server PHP enabled?
If PHP is enabled then the following on its own should work:
AddType application/x-httpd-php .html
drop the rewrite rule though, you shouldn't need that
affiliates4u Fantasy Football Winner 2007/08
hi Ian,
I have tried with the code you provided.
The problem is when trying to access a page the page is saved automatically to the temporary internet folder and then opens without parsing the PHP and without the images.
I have have PHP enabled.
Just tried the above with a different host and it does work. I guess One & One don't support this and neither do they help you.
Anyway thanks Ian. Is there any other way I can get around this with One & One?
dont really know about one & one, but if you were just using the php includes you could parse html pages as shtml and use SSI includes
Dan Morley
alpharooms.com
daniel at alpharooms dot com - Hotels, Flights, Airport Transfers, Care Hire + More! sign up
My Blog | Cheap Holidays
I don't know how apache is set up with one & one, but for the .htacess rule to work you need to be allowed to have file type overrides in your httpd.conf file.
It will be a line something like
AllowOverride None
and you need it to be AllowOverride FileInfo
if it currently says All, then i'm still not sure what is up with it, as that should mean the FileInfo bit is working.
I have some similar problems with a server I got from West Host this week, my tech guy will take a look next week and i'll let you know anything else that might help you.
affiliates4u Fantasy Football Winner 2007/08
Right I've managed to fix mine and I hope this helps you too, I had a little conflict with ssi handlers and php handlers in my httpd.conf file
So I hashed out the following line and it works fine now.
#AddHandler server-parsed .shtml .html .htm
You may have something similar in your set up, hope it helps.
affiliates4u Fantasy Football Winner 2007/08
Thanks Ian.
Its still not working for me. I think i'll have to start developing in PHP. Just didn't want to change all those files from HTML to PHP.
I can get SSI to work but not PHP Scripts in HTML.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks