SSI Woes, unable to include a file


So Im trying to include a file from one of my subdomains into my main domain index.shtml. However everytime I try I get the following error message:

unable to include
"/my patch/non-cgi/ssi/currentnews" in parsed
file /my path/index.shtml

Ive tried putting the file currentnews in the same directory as the index.shtml and that worked fine. Its just something about being in the subdomains directory thats throwing it off.

The code I use (without spaces between the <>s):

< !–#include virtual="/my path/non-cgi/ssi/currentnews" – >


It isn’t really clear, but it sounds like you’re trying to include a file outside the current site’s root directory. If you want to include a file from another site’s directory, you need to use a filesystem path with this syntax:

<!--#include file="/home/username/domain/etc"--> ‘include virtual’ only works for files below the web site’s root directory.

If you want useful replies, ask smart questions.


Ive tried doing that also. The directory im trying to get it from is still on my same server, its just in its own folder within one of my subdomains.

Kindve like this:

/home/username/subdomain/…/currentnews (file i want included)

So Ive tried both include virtual and include file with /home/username/domain etc but get the same response each time. Just keeps saying unable to include file.