[thelist] absolute path for SSI file

Jason Handby jason.handby at corestar.co.uk
Thu Jun 21 14:28:44 CDT 2007

Hi Pamela,

> I'm trying to use a SSI in a template that will be used by many 
> offices/divisions which have their own directory structures.  I want 
> to use an include file but I need to give it an absolute path -  such 
> as: <!--#include virtual="http://www.nist.gov/test/header.txt" --> - 
> versus <!--#include virtual="includes/header.txt" --> - but it is not 
> working.  Is it possible to use an absolute path for a SSI?

The SSI file has to be on the same site as the page it's included in.
You can either use a relative path (as in your example of
"includes/header.txt"), or an absolute path that starts from the root of
the current website (i.e. it begins with "/").

So in your case, assuming your website is http://www.nist.gov/ then it
would be

  <!--#include virtual="/test/header.txt" -->

If you google for "ssi #include syntax" you should find a few examples.



More information about the thelist mailing list