deadlock Message Board
[ March Full List | Reply ]

Feeling Groovy
From Bill on 24 March '99
replying to Cascading Style Sheets posted by Marge

To Those Concerned,

A Simple Server Side Include:

You'll fist need an .htaccess file. .htaccess is the name of the
file, there is no file extension like .txt or .html. It is simply...

.htaccess (yes, include the . )

Actually, first you'll need a server of the UNIX variety, then the
.htaccess file. You must put the .htaccess file into the directory
that contains the pages you want to parse (that contain the SSI's).

The .htaccess file must contain these lines to parse any *.html files ...

Options Includes
AddType text/x-server-parsed-html .html

... to the letter! Double check all pUnCtUaTiOn and case. To ease
your servers load you can specify only files of type .shtml like
this ...

Options Includes
AddType text/x-server-parsed-html .shtml

That's it for the .htaccess file. THAT'S ALL!

Now the HTML file(s). We'll call the first one "ssi.html" for kix:

<head><title>SSI Test</title></head>
<body bgcolor=white>
<!--#include file="page2.html"-->

Gee, that was tough.

Now for "page2.html" (note, if you're not including an entire .html
file, you don't need the head or body tags. Just the markup):

<P style="text-decoration:none;font-family:sans-serif;font-size:10pt">
<a href="">
<b>Here's some simple link to somewhere.</b></a></P>

Uh, are we done? I think so. And remember, you can also include .txt
files and all sorts of other goodies, too. Just visit the NCSA for
more sugar-coated goodies.



Reply to this message

Required Details
Your name:

Optional Details
Home page title:
Home page URL:
(if you'd like to receive
automatic replies by email)

Your Message