Aspnot Posted May 20, 2005 Posted May 20, 2005 I have a server running IIS 6 with multiple websites that I maintain on it. Each site gets promoted to a separate web host, depending on the customer's selection. A representation of the development server's configuration is below. DEV Website Customer1 Images Survey Customer2 Customer3 Customer4 I have been able to get the Customer1\Survey\Default.asp page to reference the Customer1\Header.asp include file by turning on the Enable Parent Paths in IIS 6.0 and using <!-- #Include File="../Header.asp" --> (Note that I would prefer to use this without the .. in it to reference the customer's root folder.). Now the Header.asp file loads an image that is in the Customer1\Images folder and since this is being called from the Default.asp page in the Survey folder, I have no way to reference it without using a .. in the <IMG> tag in the Header.asp file. Doing this would cause all of the pages in the Customer1 root to try to step down to the root of the webserver and it would never find the file. I know that I could use VIRTUAL, but that wouldn't work once the site was uploaded to the web host. (I know this is a rather convoluted scenario, but I cannot think of a way to make it any easier to read. Sorry.) Is there a way to set this up so that I can get all of these sites to work together properly on the dev server and still work properly once uploaded to the web host's server. Quote Aspnot
Aspnot Posted May 30, 2005 Author Posted May 30, 2005 No one can point me in the right direction here? Am I missing something real simple? Quote Aspnot
mark007 Posted June 1, 2005 Posted June 1, 2005 What's worng with .. in the img tag? Quote Please check the Knowledge Base before you post. "Computers are useless. They can only give you answers." - Pablo Picasso The Code Net
Aspnot Posted June 1, 2005 Author Posted June 1, 2005 ---------------- For example: Customer1/Header.asp has an IMG tag like <IMG src="Images/Header.gif">. When I call Customer1/Survey/Default.asp and it does an include of Customer1/Header.asp, the IMG tag uses a relative reference from Customer1/Survey and not the root Customer1 folder. That means that it is looking for Header.gif in the Customer1/Survey/Images folder that does not exist. If I were to use <IMG src="../Images/Header.gif"> in the Header.asp include file that would work in this case. But, what would happen if I called Header.asp from a folder called Customer1/Survey/2005_Survey ---------------- I would prefer to start the pathing at the root of the Customer1 site and then work my way out. That way I could always use Header.asp as an include and just use <IMG src="/Images/Header.gif">. However, since this development machine hosts multiple sites, this would send it to the root of the port 80 web site looking for a folder named Images that doesn't exist. There has got to be an easy solution to this. There is no way that I am the only one who has ever wanted to do things this way. I must be missing something really obvious here.... Quote Aspnot
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.