good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Setting referer with HTTP::Request and LWP::UserAgentby punch_card_don (Curate) |
on Mar 07, 2009 at 15:21 UTC ( [id://749047]=perlquestion: print w/replies, xml ) | Need Help?? |
punch_card_don has asked for the wisdom of the Perl Monks concerning the following question:
Moonlit Monks,
My Perl script at www.anotherdomain.com/cgi-bin/bar/myscript.pl needs to redirect to an html page that is at www.mydomain.com/foo/page.htm To ensure that this page can be accessed only by a redirect from my script - I know I'll get heat for this, but bear with me - I propose to put an htaccess file in the foo directory that will accept requests only from one specific, imaginary, referer. Then, have myscript set the referer header that accompanies its redirect. To do that, I lifted this code from here: http://www.microsoft.com/mspress/books/sampchap/5612c.aspx changing northwindtraders.com to mydomain.com But it doesn't work for me. I get the dreaded Server Error. Any advice on either how to make this code work, or other ways to do the same thing, would be greatly appreciated. Thanks.
Time flies like an arrow. Fruit flies like a banana.
Back to
Seekers of Perl Wisdom
|
|