- To: Sonam Chauhan <sonamc@xxxxxxxxx>
- Subject: Re: [SLUG] Deny http access to a domain
- From: Rick Welykochy <rick@xxxxxxxxxxxxx>
- Date: Tue Dec 5 00:20:23 2000
- Cc: kevin@xxxxxxxxxxx, Daniel Finn <finny@xxxxxxxxxxx>, slug@xxxxxxxxxxx
- Organization: Praxis Services Pty Limited
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"