[Xitami] Multiple cgi directories--confusion still
Ewen McNeill
xitami@lists.xitami.org
Sat, 01 Jun 2002 08:00:43 +0200
In message <000001c1b9a7$5564a220$d09fef0c@megabytegifqj7>, "Chris Stromberger" writes:
>Now, this seems to work when I point my browser to
>http://localhost/abc/script.py and http://localhost/xyz/script.py,
>except that relative paths in the generated html are not resolved
>correctly: references to images at "../images/x.jpg" fail to find the
>file, and a style sheet link of "../file.css" fails to find the style
>sheet.
The webserver (eg, Xitami) never sees the relative path (eg ../images/x.jpg)
only the version of the path after the web browser (Mozilla, IE, Opera, etc)
has calculated what URL to request. In your situation it sounds like
the paths being generated by the web browser are not matching what you
expect -- the relative URLs need to be based on the _webbrowser's_ view
of the website, not anything that the server knows about where to find
particular paths.
As a side note, you may get on better if you use absolute paths (eg,
/images/x.jpg) which sidestep this whole problem, and are also more
likely to be cached and reused reliably when used from multiple
directories.
You may also wish to use the Xitami [Server] debug=1 option to enable
the debug.log file, and check the exact requests Xitami is receiving,
and where it looks for the files.
Ewen
--
Ewen McNeill, Technical Consultant, iMatix Corporation www.imatix.com