Forum Moderators: phranque
Do you do any scripting?
you could try something like this for images
protecting images with php and .htaccess [webmasterworld.com]
You could also redirect or ban based on the HTTP_REFERER using php as well. You can do these in other languages too, php just happens to be my weapon of choice.
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://(www\.)?offendersite.net/.*$
RewriteCond %{REQUEST_URI} ^/.*$
RewriteRule ^.* - [F]
It appears to be working so far for links to pages, but not to images and movies.
The code you posted can be simplified and made more efficient by eliminating redundant regex and directives:
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://(www\.)?offendersite\.net
RewriteRule .* - [F]
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://(www\.)?offendersite\.net
RewriteCond %{REQUEST_URI} !^/path_to_your_custom_403_page\.html$
RewriteRule .* - [F]