Gossamer Forum
Home : Products : Links 2.0 : Customization :

Referer Restriction

Quote Reply
Referer Restriction
I have pages in html and cgi.

Since I want to use add.cgi only from html pages, I made this.
But this does not work. Please someone guide me to correct this.


if ($ENV{HTTP_REFERER} =~ /^\/cgi-bin/i)
{
print "Location: /error.html\n\n";
exit;
}
else
{
.......


ex.
/public_html/home.html should be ok, but /cgi-bin/home.cgi needs to go to error.html, but it does not work. instead of going to error.html, it goes through the add.cgi.
Subject Author Views Date
Thread Referer Restriction haruchan 3493 Feb 21, 2006, 4:53 PM
Thread Re: [haruchan] Referer Restriction
PerlFlunkie 3397 Feb 21, 2006, 6:39 PM
Thread Re: [PerlFlunkie] Referer Restriction
haruchan 3397 Feb 21, 2006, 7:06 PM
Thread Re: [haruchan] Referer Restriction
PerlFlunkie 3390 Feb 21, 2006, 7:32 PM
Post Re: [PerlFlunkie] Referer Restriction
haruchan 3390 Feb 21, 2006, 9:02 PM