in reply to Re: Redirect Eliminate
in thread Redirect Eliminate

I did that, and it didnt worlk

####### Redirection URL $ToUrl = 'http://www.google.com'; &Redirect; ####### Send to url pointed at by the hyperlink sub Redirect { print "Location: $ToUrl\n\n\n"; }

The web browser reports 404 error.

Replies are listed 'Best First'.
Re^3: Redirect Eliminate
by Corion (Patriarch) on Jan 26, 2011 at 08:31 UTC

    A "404" error means that the URL you typed in was not found. This has nothing to do with Perl or your script and everything with how your webserver is set up. Consult with your webserver administrator how to solve this problem.

    I recommend looking in the webserver error log to see if it gives more information about what URL fails.

      I believe the 404 error is a result of using characters following the script. Which would be

      ?http://www.theredirectedsite.com

        Again, this is a webserver configuration issue. Your webserver should recognize that there is a query string following the path to your file, and act accordingly.