Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] Deny http access to a domain


Sonam Chauhan wrote:

> sub handler
> {
>     if (  $ENV{HTTP_REFERER} !~ /example.com/ )
>     { return DECLINED; } #ok... go to next handler

<nitpik>

Since domains are case insensitive ...

     if (  $ENV{HTTP_REFERER} !~ /example.com/i )
----------------------------------------------^

But then again, why not put this into .htaccess or httpd.conf:


Order allow,deny
Allow from all
Deny from .example.com

The above catches as two+ level domains ending in .example.com.


Rgds
Rick W



--
Rick Welykochy || Praxis Services Pty Limited
"Tired of being a crash test dummy for Microsoft? Try Linux"