July 9, 201016 yr I have taken over the management of an existing website for a client and I am trying to include one file (containing all the META tags) inside a html file and can't seem to get it to work. I have tried using javascript and <!--#include FILE="filename.html" --> but nothing works. The whole website is built in html and I don't really want the task of changing it to PHP as that means changing all the links on all pages. (Their previous web developer created one page as a template with all the navigation, etc in and used that so now, the 144 page website has the navigation coded on each individual page.) So can anyone recommend an easy way to do this? Thanks
July 9, 201016 yr Only way that I would say is possible & fool proof is iframes. These are bad though and it would be so much better to just convert the pages over to .php Then you just 301 redirect all the .html to .php versions, no need to change all the links.
July 9, 201016 yr You could always put the following in a .htaccess file AddType application/x-httpd-php .php .htm .html AddHandler application/x-http-php5 .php .htm .html to get the server to parse those extensions as php Assuming you're using apache.
July 9, 201016 yr Author You could always put the following in a .htaccess file AddType application/x-httpd-php .php .htm .html AddHandler application/x-http-php5 .php .htm .html to get the server to parse those extensions as php Assuming you're using apache. Thanks, that's what I ended up doing and it's working great.
Create an account or sign in to comment