Forum Moderators: phranque
I have changed the code to allow yahoo and msn referrers
RewriteEngine on
RewriteCond %{HTTP_REFERER}!^$
RewriteCond %{HTTP_REFERER}!^http://mysite.com/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://mysite.com$ [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?search.yahoo.com/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?search.yahoo.com$ [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?yahoo.com/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?yahoo.com$ [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?search.google.com/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?search.google.com$ [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?images.search.yahoo.com/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?images.search.yahoo.com$ [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?msn.com/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?msn.com$ [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?search.msn.com/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?search.msn.com$ [NC]
RewriteRule .*\.(jpg¦jpeg¦gif¦png¦bmp¦js.*)$ - [F,NC]
Is every thing ok with this code.
What is the http referer for live.com (if any)
RewriteEngine on
# using the lex. eq. operator instead of a regEx
RewriteCond %{HTTP_REFERER} !=""
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mysite\.com [NC]
RewriteCond %{HTTP_REFERER} !(google¦msn¦yahoo)\.com [NC]
RewriteRule \.(jpe?g¦gif¦png¦bmp¦js.*)$ - [F,NC] BTW: What, if someone uses e.g. google.co.uk? So may be
!(google¦msn¦yahoo)\. [NC]