- Joined
- Dec 26, 2007
- Messages
- 7,357
- Reaction score
- 223
I got the block working but not the re-direct to a different image working.
This is what I have at the beginning of the .htaccess (there is also a #BEGIN Wordpress & #End WordPress - should I put it in there?)
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?(my_domain)\.com/ [NC]
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?(blocked_domain)\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ (warning_file_location) [L]
The red has been changed from what they were - the black is exactly what it was. The domains do NOT have the TLD in them.
I've tried http://www.domain.com/dir/file and /dir/file in line #5 (RewriteRule) and I've also tried with and without line #2. Line #3 the main offender is a subdomain, I've tried it with and without the subdomain.
Edit: I also tried it w/o line #4.
I have it set to this now:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?(domain)\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png|jpg)$ /(dir)/(file).jpg [L]
The block is working but not the redirect.
This is what I have at the beginning of the .htaccess (there is also a #BEGIN Wordpress & #End WordPress - should I put it in there?)
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?(my_domain)\.com/ [NC]
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?(blocked_domain)\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ (warning_file_location) [L]
The red has been changed from what they were - the black is exactly what it was. The domains do NOT have the TLD in them.
I've tried http://www.domain.com/dir/file and /dir/file in line #5 (RewriteRule) and I've also tried with and without line #2. Line #3 the main offender is a subdomain, I've tried it with and without the subdomain.
Edit: I also tried it w/o line #4.
I have it set to this now:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?(domain)\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png|jpg)$ /(dir)/(file).jpg [L]
The block is working but not the redirect.
Last edited: