Re: Relative and Absolute Address

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Chris Barber (chris_at_blue-canoe.co.uk.NOSPAM)
Date: 05/25/04


Date: Wed, 26 May 2004 00:16:33 +0100

This has been (and still is) the most stupid behaviour ever introduced into IIS and it's been the
bane of my life for some time now. I usually resort to a number of mechanisms to find the correct
reference to the root of the web application (as opposed to site) and *never* use root relative
url - not least of all because it breaks the capability to do local server-side debugging.

You'll have to dig in and replace all those references with either relative references or some
variable reference that replaces the first '/' with the *real* url required.

AFAIK there isn't a simplistic replacement to the root '/' identifier in a url.

Chris

"Nick K." <nospam@bogus.com> wrote in message news:e27sppqQEHA.3708@TK2MSFTNGP10.phx.gbl...
I recently began maintenance work on a production web server that is located
in the root directory of a web server. I moved this into a sub web on my
local web server in order to do work on it. I found that there is an include
file that references images:

<img src = "/images/Header.gif"

What worked correctly on the production server breaks on mine because of the
absolute address "/images". I removed the absolute address and changed that
to relative "images". This works in some cases but not in all because some
of the asp pages are in sub folders and all include the same include file.

I believe there is addressing like "~/" in .Net that would look in the web
application directory but this doesn't seem to work in asp. Does anyone have
a way to address a gif file from the web application level and not the web
server level?



Relevant Pages

  • Re: Relative and Absolute Address
    ... And what mechanisms might those be? ... *never* use root relative ... > You'll have to dig in and replace all those references with either ... > in the root directory of a web server. ...
    (microsoft.public.inetserver.asp.general)
  • Re: closing the active workbook
    ... there are no such references the code is pretty much as written ... I have tried alternateive fix such as: ... Private Sub Workbook_Open ... But this didnt work either - once I put it onto the web server and open ...
    (microsoft.public.excel.programming)
  • Publisher 2003 improperly references files in a web publication
    ... When I publish to the web, all references are complete paths pointing to the ... I con't copy this to a web server. ... This worked properly in Publisher 2000. ...
    (microsoft.public.publisher)
  • Re: Secure Web-Based Administration
    ... You would be best off using webmin, ... Instead of invoking root processes from your web server, ... the web server process leave authenticated requests in a queue. ... Subject: Secure Web-Based Administration ...
    (Focus-Linux)
  • Re: Root growing
    ... and other such stuff on my web server. ... especially when talking about running X as root is basically ... your normal user password, to do privileged actions. ... the default on openSUSE installations for a while now. ...
    (alt.os.linux.suse)