Getting Server Side Includes (SSI)
to run on HTML pages


An Adult Webmaster Article

Written by Tom from Tom's Newbie Booster


.htm .html .cgi .php


There are lots of different kinds of files floating around on the Internet. Their type is defined by the part that comes after the dot. Here are some common examples:

porn-page.html
counter.php
main.htm


Some pages are regular webpages, others are scripts - web programs - such as counters, blogs and banner rotators. There's also images (.jpg and .gif) of course and even .swf - which is a flash file.

SSI


Sooner or later most webmasters are going to want to use SSI. It's something that's been posted about a lot here on TNB and can save a great deal of time once mastered. There's some information on what SSI is and how to use it here:

http://www.tomsnewbiebooster.com/your-first-look-at-using-ssi.html

SSI doesn't do anything by itself. It has to be used in conjunction with webpages. But there's a catch! SSI only works on a certain kind of webpage. Those pages must end in .shtml.

.shtml pages are EXACTLY the same as .html pages - but are saved with an 's' in the filename after the DOT.

If you've been designing webpages for even a short time you've more than likely been using the following naming format:

mypage.html

Some people still use mypage.htm (with no 'L' on the end) and it's really a matter of personal preference. Either way, the .shtml might look a bit strange if you've never used it before.

If you added a SSI call onto a regular .html page you'd find that nothing happened. If you added a SSI call onto a .shtml page, something would happen and the information in the SSI file would appear on your webpage. With .shtml pages the browser knows it has to look at them carefully and obey any SSI calls it finds there.

.shtml sucks! I want to use my .html


But what if like any of us you're quite happy using your .html page naming? What if you have pages that are in the .html format which you don't want to or absolutely can't change to .shtml? There's a solution. We can tell browsers to look at .html pages as well as .shtml pages for any SSI calls.

If you've never heard of .htaccess before, take a look at this URL:

http://www.tomsnewbiebooster.com/htaccess-some-notes.html

"If you're new here, then the term htaccess is probably just another new word for you that's adding to the feeling that adult chat boards are written in a different language. (I felt exactly the same when I started out so don't worry). Htaccess is just a fancy name for a file that's created in a text editor such as Notepad in Windows. But it's not named myfile.txt - that would be too simple! It's called .htaccess There's nothing before the DOT and the name of the file NEVER changes. Adult webmasters use it to do a number of cool things."

And one of those cool things is to get SSI to work on regular .html pages. There's no disadvantages to doing this and it's very easy and fast to set up.

Here's the procedure:

1) Start notepad or another text editor.

2) Paste this line into it:

AddHandler server-parsed .html

3) Save the file as .htaccess

Don't forget the DOT before the htaccess

You might have to save the file as ".htaccess" (with the quotes around it) to get it to save with the correct filename.

It must be .htaccess

And NOT: .htaccess.txt

4) Connect to your host.

5) Upload that .htaccess to your domain name root folder. IE www.domain.com/.htaccess

You only have to do this once per domain name.

If you already have an htaccess file in that domain name, add the line from step 2) to the top of that.

And that's it! Follow those steps and you will be able to use SSI on regular HTML pages.

TOM ^"^

ICQ 12616560
Email tom@tomsnewbiebooster.com
Enter TOM'S NEWBIE BOOSTER

">Printer Friendly Version