GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Using .htaccess for Hotlink Protection. How to allow Google? (https://gfy.com/showthread.php?t=472165)

sixxxthsense 05-25-2005 11:44 AM

Using .htaccess for Hotlink Protection. How to allow Google?
 
I've enable hotlink protection on all my sites, now how do I allow google to hotlink images from my site. For example when doing an image search, I want them to cache my images.

Will this code work???
Code:

RewriteCond %{HTTP_REFERER} !^http://.*google.([^/]+)/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://.*google.([^/]+)$        [NC]


sixxxthsense 05-25-2005 11:54 AM

come on, someone has to know, dont tell me today is ALL SURFERS day!

joechip 05-25-2005 11:58 AM

Quote:

Originally Posted by sixxxthsense
I've enable hotlink protection on all my sites, now how do I allow google to hotlink images from my site. For example when doing an image search, I want them to cache my images.

Will this code work???
Code:

RewriteCond %{HTTP_REFERER} !^http://.*google.([^/]+)/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://.*google.([^/]+)$        [NC]


Google Images doesn't hotlink your thumbnails, so you can still get a thumbnail linked to your gallery or whatever on the image search without letting them hotlink to your pics.

sixxxthsense 05-25-2005 12:01 PM

Quote:

Originally Posted by joechip
Google Images doesn't hotlink your thumbnails, so you can still get a thumbnail linked to your gallery or whatever on the image search without letting them hotlink to your pics.

so the pic won't be brokeN???? how will they grab a cach of it then?

sickkittens 05-25-2005 12:04 PM

How do I change my image in Google to forward surfers a given site (in the frame) when they click on the thumb?

Lycanthrope 05-25-2005 12:05 PM

joechip is partly correct...

However, make sure you allow null referrers if you want the spiders to find your images, otherwise they'll redirect per your hotlink instructions.

This says, allow null referrers and requests from my domain only to display images. Send all other requests to hotlink.html:

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com.*$ [NC]
RewriteRule .*[Jj][Pp][Gg]$|.*[Jj][Pp][Ee][Gg]$|.*[Gg][Ii][Ff]$ http://www.yourdomain.com/hotlink.html

Lycanthrope 05-25-2005 12:06 PM

Quote:

Originally Posted by sickkittens
How do I change my image in Google to forward surfers a given site (in the frame) when they click on the thumb?

Use a framebuster script and you won't have to worry about the site getting framed.

Manowar 05-25-2005 12:12 PM

http://www.businessvoyeur.com/2005-0...nking-in-depth

sixxxthsense 05-25-2005 12:23 PM

Quote:

Originally Posted by Lycanthrope
joechip is partly correct...

However, make sure you allow null referrers if you want the spiders to find your images, otherwise they'll redirect per your hotlink instructions.

This says, allow null referrers and requests from my domain only to display images. Send all other requests to hotlink.html:

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com.*$ [NC]
RewriteRule .*[Jj][Pp][Gg]$|.*[Jj][Pp][Ee][Gg]$|.*[Gg][Ii][Ff]$ http://www.yourdomain.com/hotlink.html

I've got that part, I just wanna know how to allow google's domain cuz google has .com, .ca, .uk and all these others ... I belive that there is a single RewriteCond line that does it

sixxxthsense 05-25-2005 09:50 PM

bump for night shift :)


All times are GMT -7. The time now is 03:45 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123