http://www.perlmonks.org?node_id=263143


in reply to CGI Redirect with Status

Try it!

This:

#!/usr/bin/perl -Tw use CGI qw(:standard); my $cgi = new CGI; print redirect('http://perlmonks.org/');
Results in:
bash-2.05$ ./test.pl Status: 302 Moved Location: http://perlmonks.org/ bash-2.05$

Replies are listed 'Best First'.
Re: Re: CGI Redirect with Status
by Ovid (Cardinal) on Jun 04, 2003 at 21:01 UTC

    Your results show his problem. He wants a 301 status code (moved permanently), not a 302 status code (Found). See status code definitions for more information.

    Cheers,
    Ovid

    New address of my CGI Course.
    Silence is Evil (feel free to copy and distribute widely - note copyright text)