Forum Moderators: phranque
Order Deny,Allow
Deny from #*$!.#*$!.#*$!.#*$!
Deny from #*$!.#*$!.#*$!.#*$!
deny from #*$!.#*$!.#*$!.#*$!
<FilesMatch "^410[^.]*\.shtml$">
Allow from all
</FilesMatch>
Options All -Indexes
RewriteEngine on
RewriteCond %{HTTP:VIA} !^$ [NC,OR]
RewriteCond %{HTTP:FORWARDED} !^$ [NC,OR]
RewriteCond %{HTTP:USERAGENT_VIA} !^$ [NC,OR]
RewriteCond %{HTTP:X_FORWARDED_FOR} !^$ [NC,OR]
RewriteCond %{HTTP:PROXY_CONNECTION} !^$ [NC,OR]
RewriteCond %{HTTP:XPROXY_CONNECTION} !^$ [NC,OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [NC,OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP} !^$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^#*$!#*$!xx [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^#*$!x\ Toolbar [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^#*$!xxToolbar\ Toolbar [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^#*$!x\ Toolbar [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^#*$!\ Toolbar [NC,OR]
RewriteCond %{http_user_agent} ^#*$!x\ toolbar [NC,OR]
RewriteCond %{HTTP_REFERER} #*$!#*$!\.com [NC,OR]
RewriteCond %{HTTP_REFERER} #*$!#*$!x\.com [NC,OR]
RewriteCond %{HTTP_REFERER} #*$!#*$!x\.org [NC]
RewriteRule !410\.shtml$ - [G]
# Block image hotlinking
RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER} !^http://(www\.)?#*$!xx\.#*$! [NC]
RewriteRule \.(gif¦jpe?g)$ - [NC,F]
ErrorDocument 410 /410.shtml
RewriteCond %{HTTP_REFERER} . RewriteCond %{HTTP_REFERER} !^-?$ What it's not doing is blocking the refer. Every time someone clicks on the link on the refer site... My site still loads normally for them.
And if I add my IP it blocks it.
we are both probably overlooking something embarrassingly obvious.
RewriteCond %{HTTP_REFERER} stockleaf\.com [NC,OR]
RewriteCond %{HTTP_REFERER} archive\.org [NC]
RewriteRule !410\.shtml$ - [G]
RewriteRule to what page?
you may eliminate the domain extensions, which are basically redundant
The perfectly nice people at domainname.org would hate to be lumped together with the evil crooks at domainname.com
That part's right, isn't it? If you have an [F] or a [G] you're not rewriting to anything except the 403 page or 410 page, which your server will take care of without any further help.
In mod_rewrite, the NOT character ('!') is also available as a possible pattern prefix. This enables you to negate a pattern; to say, for instance: ``if the current URL does NOT match this pattern''. This can be used for exceptional cases, where it is easier to match the negative pattern, or as a last default rule.