[thelist] SSI problem

Anthony Baratta Anthony at Baratta.com
Tue Jun 5 15:35:04 CDT 2001


At 12:30 PM 6/5/2001, you wrote:
>You can't use ../ with SSI. You'd want to do something
>like /test/js/include.inc, from the root of the
>webserver.

It actually depends on what type of include you are using:

The Virtual directive operates on the shortcut that you are working in your 
web root directory and therefore you only need to provide the path to the 
file from there. e.g. your files on the server are actually here:

/web/sites/go/here/foo.com

Your SSI file resides here:

/web/sites/go/here/foo.com/includes

Using the virtual directive, you can ignore the everything up and including 
to foo.com. (Using [] instead of <> to fool html mailer clients.]

[!--#include virtual="/includes/ssi.inc" --]

The caveat is that you must provide the full virtual path each time you use 
it. You can not use the ../.. pathing help the web server find it. 
Therefore no matter what directory you want to call the include file from, 
you use the same pathing.

When you use the file directive, the web server assumes the directory 
structure from where the directory where the file is making the SSI call.

Using the same beginning examples, if you were to call the same include 
file from within a file from the web root you do it this way:

[!--#include file="./includes/ssi.inc" --]

or from the catalog directory...

[!--#include file="../includes/ssi.inc" --]

or from the widget directory under the catalog directory...

[!--#include file="../../includes/ssi.inc" --]

-=-=-=-=-=-=-

Since is his file include is technically correct, my first guess is "Is 
Netscape Server configured to support SSIs with HTML pages? Does it work if 
you change the page name to .shtml??
---
Anthony Baratta
President
Keyboard Jockeys





More information about the thelist mailing list