Solved

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

Posted on 2004-09-29
4
149 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How do the JavaScript &&  !== operators work together? 3 66
cookies analysis tools 2 106
Public IP Address Amazon Servers 2 62
WebSite Direction 1 62
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
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…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

740 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