Quote:
|
Originally Posted by alexg
that'd be great
|
This works in Apache. You might need to tinker a bit depending on your circumstances. "---" are comments meant for you, don't include them in the file. Obviously, you want to put the correct domain names in. PUT THIS IN THE DIRECTORIES YOU WANT TO PROTECT, NOT ABOVE THEM.
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^
http://SE-domain.com/ [NC] [OR]
RewriteCond %{HTTP_REFERER} ^
http://www.SE-domain.com/ [NC] [OR]
RewriteCond %{HTTP_REFERER} ^
http://some-other-SE-domain.com/ [NC]
RewriteCond %{HTTP_REFERER} ^
http://www.some-other-SE-domain.com/ [NC] ---and so forth...---
RewriteRule /*
http://www.mydomain.com/payupfreeloader.html [R,L]
RewriteCond %{HTTP_USER_AGENT} !^Mozilla.* [NC] ---this helps keep the autodownloader traffic to a minimum---
RewriteRule /*
http://www.MYDOMAIN.com/agent.html [R,L]