Very simple request, and I thought I would easily find tutorials on it online, but didn't find much.
I have a new universal header for my website (header.php) and I want it displayed all across the website. How can I go about doing this? It is actually in HTML format, and I am not sure if I can keep it like that, or does it have to be saved in .php to be able to display it across the website?
Right now, I am using Front Page's 'Page display' feature, which is not very effective, and I want a better faster way to do this. So that when I change something in the header file, it will be displayed all across the website immediately.
If you can tell apache to parse .html files as php you can easily include your header.php on top of all those html files. You can tell apache to parse .thml as php either via httpd.conf or simply by adding this line to .htaccess file in your directory
AddType application/x-httpd-php .html
Once either of them is done , you simply go to lets say
yourSitePage1.html and add
<? include "header.php"; ?>
And hey, if you go the httpd.conf route then you will have to restart apache before checking if it works
[edited by: Anyango at 4:47 am (utc) on Nov. 25, 2008]