What about /images/header.png ?

-
Z. Yao=20

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf =
Of Kai Peters
Sent: 2005=C4=EA8=D4=C28=C8=D5 5:51
To: [EMAIL PROTECTED]
Subject: [REBOL] cgi path


Thanks Sunanda - that was actually the first thing I tried and it didn't =

work initially. Must have screwed up the upload!?!
Didn't know about clean-path which comes in handy - lots to learn!

Using the script below, it now finds and displays the files. But all=20
relative links from the files displayed via the Rebol script  (to images =

& css scripts) are broken.
Such as: <img src=3D"images/header.png" alt=3D"ZooBase Logo" =
width=3D"750"=20
height=3D"90" border=3D"0"> and "href=3D"zbstyles.css"

I have tried playing with change-dir in the script and changing the=20
links in my html files to something like: "../httpdocs/images/header.png =

- all to no avail!

What do I need to do to make this work?

Thanks again,
Kai


#!/home/httpd/vhosts/<my domain>/cgi-bin/rebol -cs
REBOL []
cgiparams:  system/options/cgi/query-string
print "Content-type: text/html^/"
destpage:  first  parse/all cgiparams "&"
destpage:  second parse/all destpage  "=3D"
;****************************************************
;  does the replace make it safe enough?
;****************************************************
filename:  rejoin [ %../httpdocs/ replace/all destpage "/" "@" ".html" ]
either exists? filename [
   html: read/lines filename
   print html
][
   print ["couldn't find " filename clean-path filename]
]

--=20
To unsubscribe from the list, just send an email to=20
lists at rebol.com with unsubscribe as the subject.

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to