Solved

Virtual Pathing Problem

Posted on 2008-10-02
3
170 Views
Last Modified: 2012-05-05
I am moving a website from a dedicated server to a server that will host multiple sites. Most of the path descriptions on the dedicated server code are relative:
 (i.e. <!-- #include virtual =  "/include/somefile.aps" --> or <img src = "/images/pixel.gif" )
and the defalt page is at the root (i.e.  wwwroot.default.asp). Now when I move a copy of the code to the new server, is will not be at root but in a subdirectory (i.e. wwwroot/myweb/default.asp).  All of the paths fail and the only way I can get the include to work is to change it to:
 <!-- #include file = "../../include/somefile.asp" --> and <img src="../../images/pixel.gif">.
 Do I have to change all of the pathing on my code??  Ugly thought!
0
Comment
Question by:kevbob650
  • 2
3 Comments
 
LVL 5

Expert Comment

by:lodar123
ID: 22626564
to my knowledge... its the ugly answer :) so yes
0
 

Author Comment

by:kevbob650
ID: 22626739
So there's no magic "virtual directory" or way to trick IIS? This is a big site with hundreds of pages.
0
 
LVL 5

Accepted Solution

by:
lodar123 earned 125 total points
ID: 22626904
i guess you could create a virtual directory, or virtual domain name and the put the url for the include. I never tried that option though.  I used ASP most of the time and used global variables for my paths then just needed to add the file name
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
Hide vba in gp 7 93
vbscript to refresh excel data connections specifying 2013 5 21
VBScript Issues 8 30
Batch file or script with password 22 38
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

813 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now