![]() |
How to block A DOMAIN using .htaccess
Some jackasses from just 1 domain hotlink my pics. I'd like to know how to set up .htaccess to block just this domain. I get traffic from many sources so typical .htaccess setup of listing domains to access won't work. I just need to block 1 domain.
Any help would be greatly appreciated. Thanks, G |
Just put:
deny from domain.com in .htaccess |
|
Quote:
Much appreciated, G |
Quote:
I'd like to just DENY one IP/domain |
I guess what I need is .htaccess code that ALLOWS HOTLINKING but BLOCKS only the referrers I listed in the .htaccess file.
Can this be done? I allow my users to hotlink but there's just 1 forum site that is out of control! Any help would be appreciated, G |
can also deny one IP or adress in Apache config file
|
Quote:
|
Im not sure if this works...
RewriteCond %{HTTP_REFERER} ^http://.*hotlinker.com.*$ [OR] RewriteRule .[Jj][Pp][Gg]*$ http://yoursponsor.com [L] |
Quote:
so I used the following: RewriteEngine on RewriteCond %{HTTP_REFERER} ^http://IPADDRESS.*$ [OR] RewriteRule .[Jj][Pp][Gg]*$ http://mysponsor.com [L] Am I doing it right? |
Quote:
In that file opened with NOTEPAD, you will see the following: .... # # Controls who can get stuff from this server. # Order allow,deny Allow from all </Directory> ....... change that to: # # Controls who can get stuff from this server. # Order allow,deny Allow from all deny 216.111.154.112 deny www.asshole.com deny asshole.com </Directory> Save the file by selecting in notepad the proper original file, then writing over. Restart Apache. If Apache fails, you have an error. The backup file is then very welcomed.... |
SteveO, DirectFiesta, Luke,
Thanks for the help. I fixed the problem. G Sharp |
All times are GMT -7. The time now is 07:21 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123