[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] redirect using print "Location:"
- Subject: Re: [cobalt-users] redirect using print "Location:"
- From: "Brian Curtis" <admin@xxxxxxxxxxx>
- Date: Sun Jul 16 06:26:29 2000
- Organization: Pomfret Computer Technologies
----- Original Message -----
From: "Jim Carey" <cobalt@xxxxxxxxxx>
> I am doing a
>
> print "Location: $target\n\n";
>
> This produces a page with:
>
> "Found
> The document has moved here"
>
> in my browser with a link to $target at "here"
>
> Question is how can I have it automatically go to the link rather than
> asking user to click on the link ?
Perl I assume? If this is basically all that's in your script, then it
should redirect automatically. However, if you throw out the Content-type
header first, then it will be treated as a regular page (or image or
whatever content type you specified).
If you have PHP support, look into the header() command. I find it much
easier to use than a perl redirect. i.e.: header("Location:
http://www.yourdomain.com/somepage.html") and that's it.
BC