Solved

Virtual Pathing Problem

Posted on 2008-10-02
3
178 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
[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
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
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.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

717 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