Sea Crest Hosting Forum Index Sea Crest Hosting
Quality Web Hosting with a Personal Touch...
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SSI the easy way

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    Sea Crest Hosting Forum Index -> Scripting Tips & Tricks
View previous topic :: View next topic  
Author Message
Piggie
Site Admin


Joined: 10 Dec 2005
Posts: 59
Location: Florida

PostPosted: Sat Mar 10, 2007 6:42 pm    Post subject: SSI the easy way Reply with quote

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 Piggie!
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    Sea Crest Hosting Forum Index -> Scripting Tips & Tricks All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Sponsored by Sea Crest Hosting © 2005, 2007
Quality Web Hosting with a Personal Touch...

Powered by phpBB © 2001, 2007 phpBB Group