|
|
![]() |
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
![]() |
#1 |
old enough to be Grandma Scrotum
|
Htaccess that allows Google & Yahoo images?
It's mentioned in another thread but I thought I'd start a new one.
Can someone post a htaccess that allows Google and Yahoo images to find and use your pics, but doesn't let the Fuskers and others in? Thanks ![]()
__________________
![]() |
![]() |
![]() |
![]() |
#2 |
I'm the only guy in the world who has to wake up to have a nightmare
Join Date: Feb 2004
Location: London, United Kingdom
Posts: 1,895
|
Hi Grandma Scrotum,
add RewriteCond %{HTTP_REFERER} !^http://(www\.)?google.com.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?yahoo.com.*$ [NC] Into your htaccess and you should be good to go ![]() |
![]() |
![]() |
![]() |
#3 |
WHO IS FONZY!?! Don't they teach you anything at school?
|
you can block all hotlinking and allow google and yahoo (and your domain(s) ) to be simple...plug in what you want at htaccesstools.com
|
![]() |
![]() |
![]() |
#4 |
I'm the only guy in the world who has to wake up to have a nightmare
Join Date: Feb 2004
Location: London, United Kingdom
Posts: 1,895
|
whoops, not to clear there, should have posted this one:
RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com:80.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?google.com.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?Googlebot-Image*$ [NC] RewriteRule .*[Jj][Pp][Gg]$|.*[Gg][Ii][Ff]$ http://www.yourdomain.com/hotlink/hotlinkimage.jpg Then you need to put a seperate htaccess inside your special hotlinking folder that will allow the hotlinking of THAT image: RewriteEngine on RewriteRule ^.*$ - Hope that helps ![]() |
![]() |
![]() |
![]() |
#5 |
I'm the only guy in the world who has to wake up to have a nightmare
Join Date: Feb 2004
Location: London, United Kingdom
Posts: 1,895
|
Or you can do it the easy way like what DarkEmber said
![]() |
![]() |
![]() |
![]() |
#6 |
old enough to be Grandma Scrotum
|
Thanks
![]()
__________________
![]() |
![]() |
![]() |
![]() |
#7 |
a.k.a. Sparky
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
|
actually, that won't work completely.
You have to take into account that google uses images.google.com. Then you have to consider that they also use images.google.ca, and images.google.fr, etc. Then you decide, hey, I'll just add 'google' to the list, and fusker starts using google.fusker.com or fusker.com?google.php. Its a never ending battle. Also, to my knowledge, I haven't seen any google sites with Googlebot-Image in the hostname -- that looks more like a UserAgent. Since their robots don't send referrers, and that doesn't look like something that would be in the referrer, I think that line might not be needed. I could be wrong. Happens a lot.
__________________
SnapReplay.com a different way to share photos - iPhone & Android |
![]() |
![]() |
![]() |
#8 |
You tried your best and you failed miserably. The lesson is 'never try'
Join Date: Oct 2004
Posts: 166
|
A little tip
![]() You want Google and Yahoo to show thumbs. You dont want google and yahoo showing large pics. You dont what google and yahoo showing the html. Lets see who figures out why first : ) - |
![]() |
![]() |
![]() |
#9 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
Over the years I've looked at my stats to see what IPs and domains are sending me traffic.Then I'll go looking at ones in question and sometimes add them into my good list.
To avoid fuckers like fusker I don't use wildcards in my htaccess so I end up with this really big messy htaccess with way too many lines but my server seems ok with this so who am I to argue with it. Here are a few lines from mine. RewriteCond %{HTTP_REFERER} !^http://216.239.57.104*$ [NC] RewriteCond %{HTTP_REFERER} !^http://216.239.57.104/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://216.239.57.104:80/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://216.239.57.104:80.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.alexa.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://alexa.com*$ [NC] RewriteCond %{HTTP_REFERER} !^http://alexa.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.alexa.com*$ [NC] RewriteCond %{HTTP_REFERER} !^http://alexa.com:80/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.alexa.com:80/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://alexa.com:80.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.alexa.com:80.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.images.google.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://images.google.com*$ [NC] RewriteCond %{HTTP_REFERER} !^http://images.google.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.images.google.com*$ [NC] RewriteCond %{HTTP_REFERER} !^http://images.google.com:80/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.images.google.com:80/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://images.google.com:80.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.images.google.com:80.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.google.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://google.com*$ [NC] RewriteCond %{HTTP_REFERER} !^http://google.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.google.com*$ [NC] RewriteCond %{HTTP_REFERER} !^http://google.com:80/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.google.com:80/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://google.com:80.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.google.com:80.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.images.search.yahoo.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://images.search.yahoo.com*$ [NC] RewriteCond %{HTTP_REFERER} !^http://images.search.yahoo.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.images.search.yahoo.com*$ [NC] RewriteCond %{HTTP_REFERER} !^http://images.search.yahoo.com:80/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.images.search.yahoo.com:80/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://images.search.yahoo.com:80.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.images.search.yahoo.com:80.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.yahoo.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yahoo.com*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yahoo.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.yahoo.com*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yahoo.com:80/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.yahoo.com:80/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yahoo.com:80.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.yahoo.com:80.*$ [NC] |
![]() |
![]() |
![]() |
#10 |
old enough to be Grandma Scrotum
|
Thanks Cleo
I originally asked this because I've stumbled across older sites where I forgot to put htaccess on it, and was getting traffic from Google Images. I had thought it would be nice to keep getting that traffic, while still using htaccess. Obviously google images does have it's limitations. I could create a separate folder with "googleable" images in it, but I was just looking for a quick thing to whack into the main pics folder. Barron, are you talking about the way google loads the whole image as a thumb, or the way it loads the original page in a frame? Perhaps I should start separating out my thumbnails into a separate folder and allowing google to use that?
__________________
![]() |
![]() |
![]() |
![]() |
#11 |
I'm the only guy in the world who has to wake up to have a nightmare
Join Date: Feb 2004
Location: London, United Kingdom
Posts: 1,895
|
Glad to say I've learned something too here
![]() Thanks for that code Cleo, nice one. cd34, yeah you're probably right, I saw it in my stats way back when I first done my htaccess, and was even greener than I am now, and of course, it shows up in the robots not the referrers ![]() |
![]() |
![]() |
![]() |
#12 | |
Former pr0n slinger.
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
|
|