Website Babble Webmaster Forums  
  #1 (permalink)  
Old 01-14-2008, 06:09 PM
ydx ydx is offline
Regular Babbler
 
Join Date: Jan 2008
Posts: 84
ydx has a few positive reputation points
Default Questions about server side includes

I have no idea where to start with this.

Do webhosts supply the tools I need to use server side includes? If so, how do I use them?


Thanks
ydx
Reply With Quote
  #2 (permalink)  
Old 01-14-2008, 07:03 PM
lisa's Avatar
Administrator
 
Join Date: Apr 2007
Location: Dallas, TX
Posts: 3,796
lisa is the Admin and cannot be rated.
Default

Most standard hosts provide the functionality for you to use SSI and it's done by simply adding the following code to your page where you want the included file to show up...

<!--#include virtual="includes/page.html" -->

(where includes/page.html is the path to the included page)

Now if I remember correctly, I had to adjust my .htaccess file on my server in order for the include to work with .html extensions. (I got help from my host) By default I believe you have to save your pages as .shtml and I didn't want to to do that because that would mean the path to all my pages would change.

Anyone else got something to add?
__________________
Don't put the cart before the horse.
Plan your website, then create it.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 Create a Website | 2 Create a Website Blog
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Recent Blog Posts...

10 Reasons You Should Be YouTub-ing
Is Google AdSense Dead?
Ever Run Out of Blog Topics?
Reply With Quote
  #3 (permalink)  
Old 01-14-2008, 08:15 PM
Master Babbler
 
Join Date: Dec 2007
Posts: 117
foong has a few positive reputation points
Default

Just to add a little to the SSI. Generally, web servers will have already enable SSI for .shtml and to enable SSI for other extension (i.e .htm .html), you will need access to .htaccess in your 'public_html' folder, enter the following code in it :-

AddType text/html .htm
AddHandler server-parsed .htm
Options Indexes FollowSymLinks Includes

Above will enable SSI for files with .htm extension.
__________________
Foong
22 steps on how to create a good website
Dotservant.com friendly website hosting since 2000

Last edited by foong; 01-14-2008 at 08:18 PM.
Reply With Quote
  #4 (permalink)  
Old 01-14-2008, 08:40 PM
ydx ydx is offline
Regular Babbler
 
Join Date: Jan 2008
Posts: 84
ydx has a few positive reputation points
Default

Thank you much foong and Lisa! I've been trying to understand this for a while now.
Reply With Quote
  #5 (permalink)  
Old 01-14-2008, 11:35 PM
lisa's Avatar
Administrator
 
Join Date: Apr 2007
Location: Dallas, TX
Posts: 3,796
lisa is the Admin and cannot be rated.
Default

Quote:
Originally Posted by foong View Post
Just to add a little to the SSI. Generally, web servers will have already enable SSI for .shtml and to enable SSI for other extension (i.e .htm .html), you will need access to .htaccess in your 'public_html' folder, enter the following code in it :-

AddType text/html .htm
AddHandler server-parsed .htm
Options Indexes FollowSymLinks Includes

Above will enable SSI for files with .htm extension.
Ahhh.... yes, that's what it was. Thanks foong!
__________________
Don't put the cart before the horse.
Plan your website, then create it.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 Create a Website | 2 Create a Website Blog
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Recent Blog Posts...

10 Reasons You Should Be YouTub-ing
Is Google AdSense Dead?
Ever Run Out of Blog Topics?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -6. The time now is 07:23 PM.



WB Sponsors

Profit Lance Review

Work At Home Jobs

Houston Web Design



 Subscribe to the Website Babble Feeds

2 Create a Website Homepage | 2 Create a Website Blog


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0