: 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$
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.
More posts by @Angela700
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.