[REBOL] Re: How to cgi redirect?
From: al:bri:xtra at: 23-Oct-2002 10:37
Jason wrote:
> How to redirect immediately to a URL in cgi script if a condition is met?
> someflag: cgi-obj/someflag
> if someflag [redirect-to http://sometime.com/somepage.html]
This is from my Wiki.r script:
See-Other: func [URL [url!]] [
print rejoin [
Rebol/options/cgi/server-protocol " 303 See Other" newline
"Location: " URL newline
]
quit
]
And used like:
Script_URL: join make url! compose [
http (join Rebol/options/cgi/server-name Rebol/options/cgi/script-name)
] #"?"
See-Other rejoin [Script_URL File]
I hope that helps!
Andrew Martin