Web Hosting Talk







View Full Version : Blocking Domain


everyone
05-01-2001, 08:01 AM
How do I block a domain from linking to my site using .htaccess? I do not want any refers from this domain. Thank you!

DigitalXWeb
05-01-2001, 11:49 PM
Just block the domains IP any requests will be denied.

Put this into an .htaccess file

<Limit GET POST>
order allow,deny
allow from all
deny from (domains IP)
</Limit>

mozd3v
05-05-2001, 11:56 AM
Is it specifically the site linking content or is it the client-side calling content? What I mean is - if I call up a website from here and MY browsing client calls for specific content then it accesses it -its-self.

Understand? ... heh, hope that makes sense.

everyone
05-06-2001, 09:56 PM
It is the actual website I am trying to block. I do not want hits from them.

cperciva
05-06-2001, 10:19 PM
Well, it will slow the server down, but

RewriteCond %{HTTP_REFERER} www\.domain\.tld
RewriteRule ^.*$ /goaway.html


should work. (An alternative would be to replace "/goaway.html" with "/ [F]" which would simply return a "403 Forbidden" error.

everyone
05-06-2001, 10:22 PM
And where does this go. HTML or .htaccess? Thanks

cperciva
05-06-2001, 10:26 PM
That would have to be in either .htaccess or httpd.conf.