Forum Moderators: coopster
AddType application/x-httpd-php .htm .html
Can anyone tell me if there is a way to specify just one page to parse php, ie index.html?
Notes:
- My webserver has BSD, Apache, PHP
- I don't want to change the page name to index.php
RewriteRule ^example\.htm$ example.php [L]
If you want to actually make the page look just like it's old html self, you'll also need to take a close look at the headers and send the correct ones with PHP.
<Files index.html>
AddType application/x-httpd-php .htm .html
</Files>
I reolise the rewrite solution would work too but I'm a bit scared of changing header content as it might register to Google as a significant change on what is currently a high ranking page.
Thanks for the excellent input everyone!
Check the headers [webmasterworld.com] before the change and after the change to see the difference.
Didn't see your reply (as I thought I had finised with this). Thanks for your info, I've been checking server headers for my .htm pages that do and do not parse php. I didn't know about this stuff (more learning to do...).
I see that with .htm pages that parse php I get this kind of thing in the header:
- X-Powered-By: PHP/...
- Set-Cookie: xyz...
So obviously if Google (and others) want to distinguish between static and non static pages they can. I have some very well ranking .htm pages that parse php - so perhaps I'm being paranoid? i.e perhaps it does not matter. (I bet there is a long debate about this question, that I have not been aware of).
Anyone who knows about headers + SEO care to comment?