Samn has asked for the wisdom of the Perl Monks concerning the following question:

Replies are listed 'Best First'.
Re: 404 page
by tachyon (Chancellor) on Apr 13, 2002 at 12:14 UTC

    When Apache redirects it makes a new %ENV and renames the old vars REDIRECT_ thus you may find what you want in $ENV{REDIRECT_HTTP_REFERER}

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

•Re: 404 page
by merlyn (Sage) on Apr 13, 2002 at 13:39 UTC
Re: 404 page
by Dog and Pony (Priest) on Apr 13, 2002 at 12:05 UTC
    I don't recall, but you could try this script (as your 404 page, or put the code in it at least) and see if you see anything that seems to fit the bill:
    #!/usr/bin/perl print "Content-type: text/html\n\n"; foreach $key (keys %ENV) { print "$key: $ENV{$key}<br>"; }
    Update: Browsing the apache docs a little, it would seem as if there are some new environment variables created, prefixed with REDIRECT_ that is probably what you are looking for. More info here. If you are not using apache, my bet is that the server has the same variables, or something similar accessible anyways. Look at the appropriate docs. :)
    You have moved into a dark place.
    It is pitch black. You are likely to be eaten by a grue.