Forum Moderators: phranque
<Files .htaccess>
deny from all
</Files>
ErrorDocument 401 /error_docs/401.html
ErrorDocument 403 /error_docs/403.html
ErrorDocument 404 /error_docs/404.html
Options +FollowSymlinks +SymlinksIfOwnerMatch
RewriteEngine on
RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER}!^http://(www\.)?mysite1\.com [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?mysite2\.com [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?mysite3\.info [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?mysite4\.com [NC]
RewriteCond %{HTTP_REFERER}!^http://images\.google\. [NC]
RewriteCond %{HTTP_REFERER}!^http://search\.msn\.com [NC]
RewriteCond %{HTTP_REFERER}!^http://*\.search\.yahoo\.com [NC]
RewriteCond %{HTTP_REFERER}!^http://web\.ask\.com [NC]
RewriteCond %{HTTP_REFERER}!^http://search\.lycos\.com [NC]
RewriteCond %{REQUEST_URI}!^/images/hotlink\.gif$
RewriteRule \.(gif¦jpe?g¦wmv¦png¦php)$ /images/hotlink.gif [L]
php_flag register_globals off
My specific question is, have I got the syntax correct for the line that refers to yahoo?
I would like the regular expression wildcard to include [images.search.yahoo.com...] but also country-specific image searches such as [uk.search.yahoo.com...]
I just stuffed an asterix in there but I suspect it's not as simple as that.
Thanks!
So, it's
RewriteCond %{HTTP_REFERER} !^http://.*\.search\.yahoo\.com [NC]
See the regular expressions tutorial cited in our forum charter [webmasterworld.com] for an introduction to this powerful pattern-matching tool.
Jim
I think I'm covered for Yahoo's country variants as they all seem to redirect to [something.yahoo.com...]