Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Another way to find http referrer

by derby (Abbot)
on Feb 27, 2012 at 23:48 UTC ( #956551=note: print w/ replies, xml ) Need Help??


in reply to Another way to find http referrer

Configuring at the apache level is the most secure route ... but the following could be used as the base for redirecting to https. Hopefully all your requests are GETs. If not, I look forward to your next question on why you lose POST params on a redirect.

#!/usr/bin/perl use CGI; my $cgi = CGI->new; my $proto = $cgi->protocol(); print $cgi->header, $cgi->start_html( 'protocol test'), $cgi->h1( 'proto is ' . $proto ), $cgi->end_html;

-derby


Comment on Re: Another way to find http referrer
Download Code
Replies are listed 'Best First'.
Re^2: Another way to find http referrer
by Anonymous Monk on Feb 28, 2012 at 00:46 UTC
    derby, I am using other CGI module in my script but can change. I look for 'protocol()' in CGI at cpan but not on the page and find 'https()' instead, another one not known. Then I test $cgi->https() and $cgi->protocol() and 'https()' return nothing, but 'protocol()' return 'https'. Another way. Thank you.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://956551]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2015-07-30 03:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls