in reply to How to reliably get referrer?

You should specify originally requested page as perl script parameter. When user requests http://site-a/filename, you redirecting him to http://site-b/script.pl?file=filename and from script.pl you can redirect him back using file parameter.

Replies are listed 'Best First'.
Re^2: How to reliably get referrer?
by chromatic (Archbishop) on Mar 02, 2009 at 20:44 UTC

    What if the user bookmarks the latter and removes the query string? What if the user types it in directly? What if the client ignores query string parameters?

    This isn't completely reliable either.

      True, but the OP didn't specify any concerns about malicious users trying to break the app. The referer business is unreliable even when users are friendly.

      UPDATE: I guess "spoofed" does sound like a concern about tampering by users.

      This isn't completely reliable either.

      Sure. There's alway possible to use user agent which doesn't support redirection ;).