Forum Moderators: phranque
I keep all includes as plain text files, you just change the text file and off you go.
The big issue for you will be changing all the include bot stuff to a simple include command. I have in the past tried to do this with a search and replace and it has always been a mess, I have ended up doing it manually, but not, thank goodness, on thousands of pages.
Also if you don't want to have to change all the extensions on your current files to .shtml - and lose your SE positions and create a heap of bad links - you will need to configure your server to parse .html files for SSI.
Example, a footer:
<?php include("php/footer.html");?>
It is pretty easy to do this, but it really depends whether or not your host makes it easy.
There is little practical difference between the two but PHP includes have the HUGE advantage that they allow you to include content from another domain, which can be really handy.
On the other hand, PHP includes do not suffer from this malady. I tried them both, and PHP is significantly faster, course everyone has their favorite scripting language.
In your root level .htaccess:
AddHandler application/x-httpd-php .php .html
It may of course depend on how your server is configured.
if you don't want to have to change all the extensions on your current files to .shtml
I've taken to using the .shtml extension for new pages that I think outsiders are likely to link to, whether I'm using includes or not. That way, if I want to use includes later I can do so without messing up links, etc.
It might not be the most efficient use of server resources, but it makes more efficient use of other resources.
Related information is also contained in this post about using If Modified Since [webmasterworld.com].