Solved

windows 2000 - IIS - virtual include paths in virtual directories - how do they work?

Posted on 2004-09-29
4
150 Views
Last Modified: 2013-11-18
Operating system: windows 2000
Web server: IIS 5.0

Note: I asked a similar question yesterday, but did not realize the answer related to Apache not IIS. So I'm trying again.

My Web host says I have to use the path:

include virtual="/btslmtrad2.datasecure.net_non_ssl/niveau-b/includes/connect_db.asp"

I've given it some thought and I've figured that I can live with using the virtual folder name in my path: "/niveau-b/", because on my local installation of IIS, my virtual directory name would also have to be included in the path.

But I don't want to use "/btslmtrad2.datasecure.net_non_ssl"

Is there any way it can be removed from the path by some setting or configuration or something?

Ideally, my path would be the following:

include virtual="/niveau-b/includes/connect_db.asp"

Can anyone who is familliar with IIS help?

If you know of a solution, could you phrase it in a way that my Web host help agent would undertand?

Thanks




0
Comment
Question by:vanauden
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 14

Accepted Solution

by:
alimu earned 500 total points
ID: 12196276
Hi,
hope this explains things for you.

if you can create an IIS root level virtual directory that points to the niveau-b directory, called "niveau-b" then yes, you could do this.  If your ISP has you running your site out of a subweb then I doubt you will have any option but to use the address they have provided.

The / at the beginning of the path provides an absolute reference to a location.  / indicates the root of the IIS site.
Another thing to note is that your end-users don't see the include statement, just the contents of the resource being included so from the end-user perspective the syntax is irrelevant.

[Further info: If you do not have the / at the beginning of the path, it becomes a relative path reference.  The problem with using relative paths for includes is that you have to continually adjust the path depending on which directory you are calling the include file from.  The larger your site gets, the more of a nightmare this becomes.  If you use relative paths and then later down the track shift a directory to somewhere else in your site hierarchy, you would have to go through and recode every one of these links.]
0
 
LVL 14

Expert Comment

by:alimu
ID: 12196291
btw - if you are having a problem on the development machine due to the path they have provided, you can always create yourself an IIS virtual directory called btslmtrad2.datasecure.net_non_ssl with the same subdirectory structure they are using.  This will allow you to replicate the live environment.
0
 
LVL 1

Author Comment

by:vanauden
ID: 12221063
I think you are right alimu. It must be a subweb.

That is the only way I can figure it. Something like a virtual directory within a virtual directory.

For my situation (building sites for customers to place on their server at project completion) that sucks!

Thank you, alimu, for your input and help on this.

0
 
LVL 14

Expert Comment

by:alimu
ID: 12222496
no problem - it's not pretty looking with that particular address but it actually makes things pretty flexible if your include paths are absolute (i.e. starting with \).  It means that as long as you keep your includes in the same place you can shift around your subwebs as much as you want.  
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question