blacklist


Blocking Referers and IP adresses using mod_rewrite

Blocking a single referer: RewriteEngine on RewriteCond %{HTTP_REFERER} example\.net [NC] RewriteRule .* – [F] Block more than one referrer: RewriteEngine on RewriteCond %{HTTP_REFERER} example\.net [NC,OR] RewriteCond %{HTTP_REFERER} anotherexample\.net RewriteRule .* – [F] Using rewritemap: RewriteMap blacklist txt:/path/to/blacklist.txt RewriteCond %{HTTP_REFERER} ^(.*)$ RewriteCond ${blacklist:%1} ^denied$ [NC] RewriteRule (.*) – [F] Just create a text file blacklist.txt with the following […]