Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSI Not working 1

Status
Not open for further replies.

jimmythegeek

Programmer
May 26, 2000
770
US
If I open the following file, it works fine:

netbar_portable.html

I have tried all of the below includes in my index page, to no avail, the netbar page (basically a navigation bar) does not appear.

<!--#include virtual=&quot;netbar_portable.html&quot;-->
<!--#include file=&quot;netbar_portable.html&quot;-->
<!--#include virtual='netbar_portable.html'-->
<!--#include file='netbar_portable.html'-->
<!--#include virtual=&quot;netbar_portable.asp&quot;-->
<!--#include file=&quot;netbar_portable.asp&quot;-->

By the way, what is the difference between include virtual and include file?

Thanks for any insight.
Jim Lunde
compugeeks@hotmail.com
Custom Application Development
 
When using a virtual file you have to do it in an asp page, and the path to the virtual file must be from the root directory.

Hope that helps.
Liz Catch the vigorous horse of your mind!
 
Actually, it has nothing to do with ASP. virtual is used to specify a path/filename relative to the BASE directory of the web server. file is used to specify a path/filename relative to the directory of the CURRENT DOCUMENT. So if your current document is in /mypages, and you have an file you want to include from the same directory, you could specify either
Code:
virtual=&quot;/mypages/include.txt&quot;
or
Code:
file=&quot;include.txt&quot;
.

Your problem may be due to the fact that many webservers require files which contain SSI commands to end in .shtml instead of .html, so they know to parse them. Try renaming you index file to .shtml. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Thank you for your responses. I figured it out. For firsts, my index file had to be an .asp file, not an htm file. And second, the html file I was trying to include (recieved it from corporate), had instructions (comments) at the top of the page. In the comments was the include to use. The include in the comments was being read as an actual include file, and could not find the correct path, so I waxed that line, and all is well now,

Thanks again Jim Lunde
compugeeks@hotmail.com
Custom Application Development
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top