"Truthful, Reliable And Researched Information
You Can Use With Total Confidence"
Feel free to comment or contact us at any time

March 15, 2007

Server Side Includes - Easy Way To Update Specified Content In ALL Your Web Pages

Filed under: 5 Minute How-To's — Ade Martin @ 12:48 am

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

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

(required)

(required)