[plt-scheme] web-server: base address of error pages

From: Arjun Guha (guhaarju at grinnell.edu)
Date: Sun May 15 18:09:58 EDT 2005

Hello,

I've customized the conf/not-found.html file on a website I run to  
include an image and use a style-sheet.

http://kdic.grinnell.edu/plt-banner.png
http://kdic.grinnell.edu/style.css

I reference them with a relative url in conf/not-found.html:

<link rel="stylesheet" type="text/css" href="style.css" />
<object data="plt-banner.png" height="31" width="88" type="image/png"/>

because I thought the base address of the error pages was "/".   
However, it turns out that the base address is dependent on the URL  
requested.

So, if we go here:

http://kdic.grinnell.edu/knopfler

The not-found.html page loads with the style-sheet and the image.

However, if we go here:

http://kdic.grinnell.edu/staff/satriani

The style-sheet and URL don't load[1], because the base address is of  
the error page is /staff.

I haven't done enough web programming to know if one would want this  
or not.  So, is this a bug or a feature?

-Arjun

[1] Actually, the image does load, since I copied it to /staff to  
test my theory.  However, if we request http://kdic.grinnell.edu/ 
staff/satriani/ (trailing / required), it doesn't load.  My guess is  
that the code couldn't find the index file in the /staff/satriani  
directory, and set the base address to /staff/satriani.  So, this  
last bit is a bug.



Posted on the users mailing list.