Server Side Includes - Easy Way To Update Specified Content In ALL Your Web Pages |
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
Here’s a a powerful and simple way to be able to update any specified content across a whole range of pages on your web site.
An example would be a changeable navigation menu across hundreds of pages. Just change 1 file instead of hundreds!
As long as your host has SSI, Server Side Includes, enabled this is a breeze.
Al that needs to be done is to name your .html page .shtml and use the following:
Assuming you want to have a footer with your site navigation menu on it called footer.php - (you need to know nothing about php for this!)
Copy your site nav menu html code and paste it into a blank document in your text editor and name it footer php. No need to use < html > < /html > or body tags - just paste and save the nav menu code.
On the pages where you wish to have your nav menu just put:
If you already have existing .html pages and don’t wish to change the file extension - perhaps it’s a mature page already indexed by the SE’s - then simply create a .htaccess file in the same directory as the page with the following:
AddHandler server-parsed .html
Note: this will probably work but your host may have another command.
Ade



