var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
php on .html?
I've heard that some servers will execute PHP code on .html documents.
I would appreciate your recommedations about hosts with servers that will do this.
Why do I need this? I've just bought a site that has handcoded footers on .html pages. Of course the footers must be PHP, but I can't change the file extensions, because of SEO.
Thanks in advance,
Any host that support .htaccess will allow you to do this.
Just create a .htaccess file and put the following in it:
AddType application/x-httpd-php .php .php3 .php4 .phtml .html
Problem with doing this is that EVERY .html file, whether it has php code or not, will be put thru he parser.
you can also mod_rewrite the .php pages to .html
Thanks for your suggestion, ArtieFishill.
I know your code to be correct, but in my case it produced an error. I will have to contact support about this.
Thanks for pointing me in the right direction.
- - you can also mod_rewrite the .php pages to .html - -
That's also a possibility, thanks.
RewriteRule (.*)\.html$ $1\.php [T=application/x-httpd-php,L]
This does the trick. But I will have to rename all my pages from .html to .php.
they can add the call in apache as well
Carolina Hosting Services
| @CarolinaHosting | Facebook.com/CarolinaHosting
VMware | cPanel | Linux | Softaculous | 16 Years Hosting Experience
I use this in .htaccess:
AddHandler application/x-httpd-php .htm
It does the job.
(Yes, I'm old fashioned and use .htm. Actually, I don't want to change all the file names and mess up the search engines. )