Using SSI's To Ease Site Maintenance
By Lauri Harpf
2003-09-27
Reader Rating:

Changing Your Pages
After the .htaccess file has been created, you'll have to make changes to your HTML files. To be on the safe side, take backups of them before doing anything. Then, paste the HTML you use to generate the menu from one of your pages into a blank file. Save the file as "navig.html" for example. Next, remove the navigation menu from all of your pages. Replace it with the following line:
<!--#include file="navig.html" -->
What you're doing is telling the server to insert the code from "navig.html" into the page. This will be done before the page is sent to the user who has requested it, so anyone visiting your site will merely see a normal HTML file. When you have finished editing your files, connect to your host via FTP and upload the ".htaccess" file, the "navig.html" file and the new versions of your content pages.
Then it is time for the true test, trying to visit your site and see what happens. If you have done everything correctly, you should see that your pages look the same as before. However, if you make a simple change to the "navig.html" file, it will apply to the navigation menu of every page. What used to take minutes or even hours can now be done in seconds, giving you the possibility to use that valuable time to do something other than changing the HTML code of each page separately.
If you found this article interesting, you may want to read these as well:
» The Basic Uses Of SSI - Server Side Includes
» Taming the Update Monster
» The Background-Table Combo
|