Mobile app version of vmapp.org
Login or Join
Angela700

: Here's other code that is similar to yours that makes it easy to understand what is blocking: RewriteCond %{HTTP_REFERER} !^http://mySite1.com$ [NC] RewriteCond %{HTTP_REFERER} !^http://mySite2.com$

@Angela700

Here's other code that is similar to yours that makes it easy to understand what is blocking:

RewriteCond %{HTTP_REFERER} !^http://mySite1.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mySite2.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://ask.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://bing.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://duckduckgo.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://google.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://ixquick.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://msn.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://startpage.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://yahoo.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://mySite1.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://mySite2.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://ask.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://bing.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://duckduckgo.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://google.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://ixquick.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://msn.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://startpage.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://yahoo.com$ [NC]
RewriteCond %{REQUEST_URI} ^(.*).(bmp|gif|ico|jpg|jpeg|pdf|png|svg|svgz|swf)$ [NC]
RewriteRule ^(.*)$ i.imgur.com/qX4w7.gif [R=301,NC,L]

RewriteCond %{HTTP_REFERER} ^$
RewriteCond %{REQUEST_URI} ^(.*).(bmp|gif|ico|jpg|jpeg|pdf|png|svg|svgz|swf)$ [NC]
RewriteRule ^(.*)$ i.imgur.com/qX4w7.gif [R=301,NC,L]


I know its long, but the first several lines are simple. Each line works with one URL and if the referrer isn't the url listed, then the list continues on down to try to match the image extension and if it matches then redirect to the no-hotlink image from imgur.com

The second set of lines are easier to understand. It basically looks for an empty referral string and does the same image extension verification as usual and redirects if theres a match.

You can add and remove sites as you please.

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Angela700

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme