Ssi "include Virtual" Command Doesn't Work?

liunx

Guest
Many sites use Server SIde Includes to put headers and footers on their pages, and mine as well. However, it would appear that the include virtual command does not work here:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><!--#include virtual="/somefile.txt." --><!--c2--></div><!--ec2--><br /><br />i am wondering if this is disabled in Apache for some reason or if i'm just a moron. It was working previously on the server i am coming from but stubbornly refuses to work now.<br /><br />as a side note: the include file command works fine, but the catch is, it only grabs files that are in the same directory. if files in subdirs need to use the header and footer pages located at the root of the tree, you must use the include virtual command. ('cept it doesn't appear to work)<br /><br />sample url:<br /><a href="http://server5.*****/~leiavoia/dd/datadumps.shtml" target="_blank">http://server5.*****/~leiav...datadumps.shtml</a><br /><br />any thought?<!--content-->
I think this is the problem<br /><br />Virtual commands tell the server to start looking for the file from the root directory where it looks for your other Web pages. This is in contrast to the file command, which tells the server to start looking in the same directory as the HTML page that contains the command.<br /><br />In some cases, you might have to experiment to find the root directory for your files by trying out different path names in your commands. For example, if all of your Web site files are in a subdirectory called /cgi-bin/gt/go_to.html,user=ffffffffffff&url=http://www.server.com/~username/www/, you might need to write a virtual command such as:<br /><br /><!?include virtual="www/ssi/header.txt" ?gt;<br /><br />or<br /><br /><!?include virtual="~username/www/ssi/header.txt" ?gt;<br /><br />You cannot use an SSI to call up a file from a different Web site. Further, you cannot call files from different parts of your site or another server that cannot be reached via a path from the root directory of the site where the HTML file containing the SSI code is located.<br /><br />BUT<br /><br />I dont think it can parse it correctly until your domain name propogates. <br /><br />Because apache is using a virtual call command to get to your public_html folder when you use the <br /><a href="http://server5.*****/~useracount" target="_blank">http://server5.*****/~useracount</a><br />instead of<br /><a href="http://www.******" target="_blank">http://www.******</a><br /><br />Make sense?<!--content-->
yup, i understand how they work. i guess i'll sit and wait for the domain name to transfer and hope for the best. <br /><br />thanks<!--content-->
 
Back
Top