On 4/28/02 11:08 AM, Mat Harrison <[EMAIL PROTECTED]> wrote:

> ok, i wouldn't mind using javascript but I don't know how it would tie in
> with my scripts. I want this cgi include to scan for a cookie, check the
> values etc and either print the membership links or redirect to the login
> page.

You can't do that if you've already printed your HTTP headers (as happens
when you're using a plain HTML file). You might want to use a meta-tag
redirect. Put the <!--#exec cgi=".."--> in the <head>, and have it do
something like this if it finds and validates the cookie:

print q~<meta http-equiv="refresh"
content="5;URL=http://www.jedimike.net/";>~ . "\n";
# (no returns in that, despite what my email client thinks)

That isn't a lightning-fast HTTP redirect, though.

Another alternative is to just have the CGI serve up the entire page. It
could read from and print your existing page if the cookie wasn't validated,
and simply print redirect headers if it is.

None of those options are pretty, but I can't think of anything cleaner at
the moment.

hth,
-- 
Michael


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to