[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] SSI and full paths
- Subject: RE: [cobalt-users] SSI and full paths
- From: "Carrie Bartkowiak" <admin@xxxxxxxxxxxxxxxxxx>
- Date: Tue Jan 2 10:19:01 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
||>I have a problem using SSI. I want a file into all of my WEB pages
||>(*.shtml) using some of the next directives:
||>
||><!--#include virtual="/home/sites/site14/web/inc/head.ihtml" -->
||>or
||><!--#include file="/home/sites/site14/web/inc/head.ihtml" -->
||>
||>None of them works. They only work if I use a relative path. For example,
||>this works:
||>
||><!--#include virtual="./inc/head.ihtml" -->
Your definition of paths is incorrect.
In SSI, you do not use full server paths. You use paths that can be reached
via the web.
A VIRTUAL path means one that starts from the root of your web. In your
case, this would mean it *starts at*
/home/sites/site14/web
So you run the VIRTUAL path from that point.
<!--#include virtual="/inc/head.ihtml" -->
A RELATIVE path means one that starts in the folder that you are currently
in. This is the FILE call. For example, if your page where you're using the
SSI is in the folder 'inc', this would be:
<!--#include file="head.ihtml" -->
If the page where you're using the SSI is in the root of your web directory,
the call would be:
<!--#include file="inc/head.ihtml" -->
It's always best to use full VIRTUAL paths, so that no matter where you
might move the page, it will still call the correct file, since it's
starting at the root of the web directory and working its way down the
structure from there.
In CGI and PHP you can use full server paths, but this isn't what you're
doing here. You're using SSI, so you need to start the paths from the 'web'
directory (for VIRTUAL) or from the directory you're in (for FILE).
Carrie Bartkowiak