I feel so much better knowing that it's documented in the standard distro at perlfaq9.shell> perldoc -q Redirect Found in /path/to/pod/perlfaq9.pod How do I Redirect to another page? Instead of sending back a `Content-Type' as the headers of your reply, send back a `Location:' header. Officially this should be a `URI:' header, so the CGI.pm module (available from CPAN) sends back both: Location: http://www.domain.com/newpage URI: http://www.domain.com/newpage Note that relative URLs in these headers can cause strange effects because of "optimizations" that servers do. $url = "http://www.perl.com/CPAN/"; print "Location: $url\n\n"; exit; To target a particular frame in a frameset, include the "Window-target:" in the header. print <<EOF; Location: http://www.domain.com/newpage Window-target: <FrameName> EOF To be correct to the spec, each of those virtual newlines should really be physical `"\015\012"' sequences by the time you hit the client browser. Except for NPH scripts, though, that local newline should get translated by your server into standard form, so you shouldn't have a problem here, even if you are stuck on MacOS. Everybody else probably won't even notice. shell>
And thank goodness that it's available online, or most likeley, right on the box perl is on!
Enjoy
-- Casey
In reply to Re: Redirection on a Website
by cwest
in thread Redirection on a Website
by vtprogrammer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |