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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSI Help

Status
Not open for further replies.

BobbaBuoy

Instructor
May 25, 2003
75
US
I am having a hard time creating a navigation menu using ssi. Here is an example of the problem:

I have a default page (default.asp) in a root directory. I have an "includes" folder in this directory with my includes in them. At the same level, I have an "about_us" folder with an "about_us.asp" page and a "content.asp" page in there.

The site opens just fine but when I click on the "About Us" menu item I get an error. There is almost nothing in any of my content.asp pages so there is no error there.

Here is what the code in the default page looks like (this works fine):
Code:
<!--#include file = "includes/header.asp" -->
<!--#include file = "includes/menu.asp" -->
<!--#include file = "includes/content.asp" -->
<!--#include file = "includes/footer.asp" -->


Here is what the code in the about_us.asp page looks like (this generates an "Internal Server Error" message):
Code:
<!--#include virtual = "../includes/header.asp" -->
<!--#include virtual = "../includes/menu.asp" -->
<!--#include file = "content.asp" -->
<!--#include virtual = "../includes/footer.asp" -->

Any help would be much appreciated!

Thanks~

Bobba Buoy
Just trying to make sense of it all ...
 
The paths you're providing AREN'T virtual, though, they're actual paths. Change virtual to file and it should work.

As well, I'd advise keeping all the pages in a single folder unless the page is a complete subsection (which the pages you described generally aren't). If your content.asp pages only gets inserted into one page and will only ever fit in one page, then put the code in the individual page to begin with.

Lee
 
Two things I can think of off the top of my head:
1) Somewhere in IIS is an option to allow access to parent folders. This option is off by default, but needs to be turned on in order to do includes that use "..".
2) You have an error in your /about_us/content.asp file.

You can get a more detailed message by turning off the "Show Friendly Error Messages" in your browser and in IIS.

The IIS friendly message setting is something like (Off the top of my head, don't have the windows machine on):
Start > Control Panel > Advanced Tools > Internet Services Manager > Rt click Default Web (or your virtual folder) > Properties > Home Directory > Configuration > Last Tab > Radio button

The "Allow Parent Paths" option is somewhere in there also. Possibly in that final popup in the first or second tab, but can't remember as I set it much less frequently.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top