Piggie Site Admin

Joined: 10 Dec 2005 Posts: 59 Location: Florida
|
Posted: Sat Mar 10, 2007 6:42 pm Post subject: SSI the easy way |
|
|
Confused about XHTML, SSI and how it all works? There is a simple way to do this.
What is SSI? It's way of putting a page or a script into a page, like a navigation bar so you don't have to do it over and over for every page, plus if you need to change something, you change one page and it changes all the other pages on the site that have it as an included SSI. Also you can think of it as a page inside another page or pages.
First you make the page you want to insert into another page or pages. Just name it for example, if it's a nav bar; navbar.html This html page has the navigation links for your site. It will display in a browser like any other html page, just it will only have your navigation links on it.
Now to put that page in another page, insert it this code into the recieving page(s):
| Code: | | <!--#include virtual="/navbar.html" --> |
This assumes you put the navbar.html in the root of your public html or in Plesk in the root of /httpdocs, other wise put the entire path staring with / at your html root.
Next make an .htaccess file and put it in root or folder where the receiving page will go with just this in it. Or add this to an existing .htaccess file.
| Code: | Options +Includes
XBitHack on |
Now open your FTP program and go to till you see the receiving page (the one with the include code in it).
Change the permissions to rwx-r--r-- or 744.
That's it! Now load the receiving page in your browser and you should see the navbar where you put the include code. _________________ This forum is made entirely of post consumer data bits... Piggie  |
|