PDA

View Full Version : how do i block a domain via htaccess?



jason
December 5th, 2003, 15:40
i want to block one domain via htaccess, how would i do this? i tried looking up info but just found stuff on block extentions and ip numbers.

Jan
December 6th, 2003, 00:53
I always use this handy code generator :)

http://htmlbasix.com/blockusers.shtml

Just key in the domain you want to block.

Loon
December 13th, 2003, 09:36
Assuming you have use of mod_rewrite which you should do:


RewriteEngine on
Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} domain\.com
RewriteRule .* - [F]