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

[REBOL] Re: http 404 header

From: al:bri:xtra at: 3-Jan-2003 13:06

Graham wrote:
> Hallvard Ystad <[hallvard--ystad--helpinhand--com]> wrote: > >Oh, and here's a second question: > >When I try to redirect from a rebol cgi script (using http headers), I am
allowed to write the Location: header, but not the first header, the HTTP/1.1 200 OK thing. Or "HTTP/1.1 302 Moved". My web server then reports an error. So I suspect a double header is written
> I don't think you can do this as your cgi script is executed by the ISP's
webserver. To send out server headers correctly, you need to run your own webserver. Perhaps run a rebol cgi script to serve on a different port ... and if your ISP will permit this. Actually you can get Rebol to send out CGI redirects, at least with Xitami and with the microsoft web server (I've forgotten it's name). My %Wiki.r script does this regularly, with this little function: See-Other: func [URL [url!]] [ print rejoin [ Rebol/options/cgi/server-protocol " 303 See Other" newline "Location: " URL newline ] quit ] And I use something like thi: See-Other join Script_URL join Folder Page I'm not entirely sure of the header number; I'm using 303 and it seems to work OK for me. Is 302 or 303 a better chooice? Andrew Martin ICQ: 26227169