[Tutor] returning a web page (and also path to web root)

Barnaby Scott barnabydscott at yahoo.com
Sun Dec 14 19:09:25 EST 2003


I am trying to write a cgi script in which under rare
circumstances I want the user to see a particular web
page (from the same server).

I am not very experienced and would be very grateful
for help on the right way to tackle this - without
knowing a sensible direction to go in I am likely to
waste huge amounts of time developing a stupid or
overly-complex solution!

Presumably if I just read the page in and spat it back
out to the user, all the relative links, image sources
etc would be wrong.

However I was a little reluctant to start messing with
the SimpleHTTPServer module - a. because I find it
daunting and b. I wondered if there was something
altogether simple and obvious I could do.

One more quick question: is there an easy way of
returning the actual path of the webserver's web root?
(Forgive my terminology if it's not right - I mean the
root directory as far as the someone accessing the
site is concerned).

__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/



More information about the Tutor mailing list