Server Side Includes Save You Time | ||||||||
|
SSI stands for Server Side Includes. Basically this means that the server (computer) adds an include into another file that resides on that server. This include can be a lot of things, but in this article we're going to talk about files. HTML files to be precise. Let me explain. If you ever designed a website, you discovered that great parts of every page are always the same. The menu, headers and footers for instance. It's repeated on every page. So, what happens if you forgot something there or if it contains an error or if want to add a link. You have to update all the pages that contain your menu, right? Not with Server Side Includes. How? Well, you simply copy and paste your menu into another file e.g. menu.html. On the pages where you want your menu to show you just put a SSI statement like <!--#include virtual="menu.html" -->. When your pages are retrieved, just before they are shown the server will include the menu.html right at that point in your page. Nobody will ever see <!--#include virtual="menu.html" --> in your pages, not even when they look in the source, because the server replaced it by the included file. See for yourself. Go to http://www.anownsite.com/internet-marketing/index.shtml (just an example, any page on http://www.anownsite.com/ will do). See the menu at the right? See the footer at the bottom? All Server Side Includes! Neat uh? You can do the same with headers and footers or any part of your web pages that is standard across your site. Now if you want to change or update anything within these standard parts, all you have to do is change one (1) file, upload it and presto .... you're done, your whole site is updated! That will save you a lot of time and you are more flexible. More importantly, it forces you to think about your web design upfront. How to put Server Side Includes into action? Well first your host must allow them. Some hosts don't. In that case find another one. Second, I always design a web page (and leave it at day or two) and then decide which parts of this page will be standard across the site. Generally this will be headers, footers and menus. Then I copy each standard part and paste it in a seperate file, appropriately named header.html, footer,html and menu.html. I save them in my root directory, so I can refer to them as <!--#include virtual="NAME.html"--> (if you put them in other directories, you should reflect that in the include statement, because virtual here points to the file path/name relative to the base directory of the HTTP server) Third, for SSI to work you need a text file called .htaccess in the directory you put your HTML file in. The file .htaccess must have the following line in it: AddType text/x-server-parsed-html .htmlFor this to work you should consult with your webhost. Maybe there are different setting necessary. And finally, you must use the extension .shtml or .shtm for all the pages that you create with an include statement. That's all. If necessary, use the term "ssi tutorial" in your favorite search engine for more information. Try it. It will save you lots of time. Wish you success. Case Stevens Webmasters/Publishers You are invited to use any of my articles as free content for your site or publications, providing you do not alter them without consulting me first, and you include the following resource box at the bottom of the article.
| ||||||||
If you stumbled upon this page by accident, and you like what you're reading here, then consider signing up for my newsletter called Affordable Online Strategies. If you sign up now you'll end your guesswork and confusion! Finally your immense concern of building online income has become ridiculously simple ... just click the link above.
| ||||||||
|
Privacy Policy - Terms of Use / Disclaimer Copyright © 2007 AnOwnSite. All rights reserved. Postbus 132, 5100 AC Dongen, Netherlands AnOwnSite Related sites: squidoo internet marketing rants - Internet Marketing Strategies - Inner Circle member Case Stevens Internet Marketing Strategies by An Own Site: Affordable Online Strategies using Tested Marketing Techniques |