|
|
|
|
|
|
![]() |
#1 |
Rock stars ... is there anything they don't know?
Join Date: Nov 2004
Posts: 15
|
htaccess question
I want to block all 'bad' sites like for example fusker or user boards from steeling my images. Now, is it better to deny specific urls or is it better to allow specific urls.. I don't want to loose my google traffic from the image search...
So in the first case (block urls from steeling my images) my htaccess would look like this: RewriteEngine on RewriteCond %{HTTP_REFERER} .*.fusker* [NC,OR] RewriteCond %{HTTP_REFERER} .*.lewww* [NC,OR] RewriteCond %{HTTP_REFERER} .*.beyond8* [NC,OR] RewriteCond %{HTTP_REFERER} .*.av999* [NC] RewriteRule ^.+\.(jpg|jpeg|png|gif)$ - [NC,F,L] and in order to allow specific urls my htaccess would look like this: RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mydomain.com.*$ [NC] RewriteCond %{HTTP_REFERER} !^.*msn\. [NC] RewriteCond %{HTTP_REFERER} !^.*yahoo\. [NC] RewriteCond %{HTTP_REFERER} !^.*altavista\. [NC] RewriteCond %{HTTP_REFERER} !^.*google\. [NC] RewriteCond %{HTTP_REFERER} !^.*webcrawler\. [NC] RewriteRule ^.+\.(jpg|jpeg|png|gif)$ - [NC,F,L] First of all, are there any mistakes in both of them? and which one would you prefer... I am confused |shocking| |
![]() |
![]() |
|
|