Greenguy's Board


Go Back   Greenguy's Board > General Business Knowledge
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2005-03-23, 05:51 AM   #1
Ms Naughty
old enough to be Grandma Scrotum
 
Ms Naughty's Avatar
 
Join Date: Aug 2003
Location: Australia
Posts: 1,408
Send a message via ICQ to Ms Naughty
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
__________________
Promote Bright Desire
Ms Naughty is offline   Reply With Quote
Old 2005-03-23, 05:54 AM   #2
Jel
I'm the only guy in the world who has to wake up to have a nightmare
 
Jel's Avatar
 
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
Jel is offline   Reply With Quote
Old 2005-03-23, 05:55 AM   #3
DarkEmber
WHO IS FONZY!?! Don't they teach you anything at school?
 
Join Date: Sep 2004
Location: Where the Cows Graze
Posts: 47
Send a message via ICQ to DarkEmber Send a message via AIM to DarkEmber
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
DarkEmber is offline   Reply With Quote
Old 2005-03-23, 05:58 AM   #4
Jel
I'm the only guy in the world who has to wake up to have a nightmare
 
Jel's Avatar
 
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
Jel is offline   Reply With Quote
Old 2005-03-23, 05:59 AM   #5
Jel
I'm the only guy in the world who has to wake up to have a nightmare
 
Jel's Avatar
 
Join Date: Feb 2004
Location: London, United Kingdom
Posts: 1,895
Or you can do it the easy way like what DarkEmber said
Jel is offline   Reply With Quote
Old 2005-03-23, 06:04 AM   #6
Ms Naughty
old enough to be Grandma Scrotum
 
Ms Naughty's Avatar
 
Join Date: Aug 2003
Location: Australia
Posts: 1,408
Send a message via ICQ to Ms Naughty
Thanks
__________________
Promote Bright Desire
Ms Naughty is offline   Reply With Quote
Old 2005-03-23, 11:17 AM   #7
cd34
a.k.a. Sparky
 
cd34's Avatar
 
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
cd34 is offline   Reply With Quote
Old 2005-03-23, 03:41 PM   #8
Barron
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 : )


-
Barron is offline   Reply With Quote
Old 2005-03-23, 03:51 PM   #9
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
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]
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2005-03-23, 07:32 PM   #10
Ms Naughty
old enough to be Grandma Scrotum
 
Ms Naughty's Avatar
 
Join Date: Aug 2003
Location: Australia
Posts: 1,408
Send a message via ICQ to Ms Naughty
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?
__________________
Promote Bright Desire
Ms Naughty is offline   Reply With Quote
Old 2005-03-24, 01:31 AM   #11
Jel
I'm the only guy in the world who has to wake up to have a nightmare
 
Jel's Avatar
 
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
Jel is offline   Reply With Quote
Old 2005-03-24, 04:34 AM   #12
Fonz
Former pr0n slinger.
 
Fonz's Avatar
 
Join Date: Aug 2003
Location: Antwerp, Belgium
Posts: 7,932
Quote:
Originally Posted by DarkEmber
htaccesstools.com
That site has some pretty useful tools
__________________
See how I abuse little trees on my Shumi no Bonsai Blog
Fonz is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:59 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc