Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: A bit OT: CGI question

From: al::bri::xtra::co::nz at: 20-Feb-2002 20:56

Robert wrote:
> Hi,
Hi, Robert!
> I use a Rebol script that takes the input from a form and sends an email
and returns a confirmation page to the client. The rebol script is located in cgi-bin/ directory the web pages are located in a html/ directory.
> The problem is that the references inside the confirmation page a now all
relative to the cgi-bin/ directory and not to the html/ directory. Any idea how this can be fixed? Make sure all references in the HTML specify filenames like: /html/picture.png /html/script.js in other words, make sure the root directory "/" is first.
> Next thing is that the displayed URL in the address entry field, shows the
link & name of the Rebol cgi script and not the URL of the conformation page. Write a redirect header back to the browser. Something like: print "HTTP/1.1 302 OK" print join "Location: " %/html/confirmation.html print "^/" Or write a small html page with a refresh tag in the header to the confirmation html page. Something like: print { <html> <head> <title>Redirecting...</title> <meta http-equiv="Refresh" content="0; URL=/html/confirmation.html"> </head> <body></body> </html> } or in my HTML dialect: print HTML [ head [ title "Redirecting..." refresh 0:00 %/html/confirmation.html ] body [] [] ] Andrew Martin ICQ: 26227169