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)
-   -   Google images htaccess redirect code not working, help please! (https://gfy.com/showthread.php?t=977856)

polle54 07-13-2010 03:17 PM

Google images htaccess redirect code not working, help please!
 
Hi coders

I have a slight issues.

I can't get my Image Redirect Script to function after Google changed the images URL.

What is wrong with this code:

RewriteEngine on
RewriteCond %{HTTP_REFERER} ^google\.com/imgres [NC]
RewriteRule .* http://xxxtremeblog.com/redir/extremesponsor.php [NC,L]

Trying to make it work on a referrer that looks like this:
http://www.google.com/imgres?imgurl=...26tbs%3Disch:1

fris 07-13-2010 10:17 PM

Code:

RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://google.com/images [NC]
RewriteRule .* http://xxxtremeblog.com/redir/extremesponsor.php [NC,L]

for google images it should be like this.

but remember its only for .com, you will need to do some regex to get all google domains incase they come from google.ru etc.

fris 07-13-2010 11:00 PM

here you go.

Code:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://.*google\.(com¦(co\.)?[a-z]{2})/(imgres¦search) [NC]
RewriteRule .* http://xxxtremeblog.com/redir/extremesponsor.php [NC,L]


polle54 07-14-2010 12:57 AM

Hi fris, thanks a million, its a step forward, this code, however, redirects everything. both google, google images and direct URL, any suggestions ?

rowan 07-14-2010 01:11 AM

Try changing .*google to .*images\.google

fris 07-14-2010 06:43 AM

Quote:

Originally Posted by polle54 (Post 17333726)
Hi fris, thanks a million, its a step forward, this code, however, redirects everything. both google, google images and direct URL, any suggestions ?

sorry remove the search part.

Code:

RewriteCond %{HTTP_REFERER} !^http://.*google\.(com¦(co\.)?[a-z]{2})/(imgres¦images) [NC]

fris 07-14-2010 06:46 AM

Quote:

Originally Posted by rowan (Post 17333743)
Try changing .*google to .*images\.google

google doesnt use images.google.com anymore.

rowan 07-14-2010 07:01 AM

Quote:

Originally Posted by fris (Post 17334170)
google doesnt use images.google.com anymore.

Hmmm interesting. I can't find images.google.com, but I can find images.google.* in other country level domains (eg images.google.hk, images.google.ca)

fris 07-14-2010 07:25 AM

ya but when you goto google images in those countries it doesnt use that url

polle54 07-14-2010 11:38 PM

Thanks again, just tried
Code:

RewriteCond %{HTTP_REFERER} !^http://.*google\.(com¦(co\.)?[a-z]{2})/(imgres¦images) [NC]
but that code still redirects everything.

fris 07-17-2010 08:51 AM

Quote:

Originally Posted by polle54 (Post 17336504)
Thanks again, just tried
Code:

RewriteCond %{HTTP_REFERER} !^http://.*google\.(com¦(co\.)?[a-z]{2})/(imgres¦images) [NC]
but that code still redirects everything.

my bad that will redirect everything except google images take the ! out of !^

polle54 07-19-2010 03:17 PM

Quote:

Originally Posted by fris (Post 17342830)
my bad that will redirect everything except google images take the ! out of !^

Now it doesn't redirect anything... I wonder if it is something on my machine.. it is a WIN 2k08 R2 server with IIS 7.5..

So not a regular setup, but still with a htaccess file.

fris 07-19-2010 04:52 PM

ya never used IIS, would have to look into it more, plus ive never really redirected google image traffic.

rowan 07-19-2010 04:57 PM

Quote:

Originally Posted by fris (Post 17334267)
ya but when you goto google images in those countries it doesnt use that url

I found those country level domains in my referer logs, so G is still using them for image searches.

GrouchyAdmin 07-19-2010 06:03 PM

You're probably going to want/need something formatted for IIRF; I have no idea what you're using for a rewrite system, and I don't do IIS either, so -


All times are GMT -7. The time now is 12:14 PM.

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