Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 07-13-2010, 03:17 PM   #1
polle54
Confirmed User
 
Join Date: Jul 2004
Location: The Beach
Posts: 4,626
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
__________________
ICQ# 143561781
polle54 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-13-2010, 10:17 PM   #2
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
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.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-13-2010, 11:00 PM   #3
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
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]
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-14-2010, 12:57 AM   #4
polle54
Confirmed User
 
Join Date: Jul 2004
Location: The Beach
Posts: 4,626
Hi fris, thanks a million, its a step forward, this code, however, redirects everything. both google, google images and direct URL, any suggestions ?
__________________
ICQ# 143561781
polle54 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-14-2010, 01:11 AM   #5
rowan
Too lazy to set a custom title
 
Join Date: Mar 2002
Location: Australia
Posts: 17,393
Try changing .*google to .*images\.google
rowan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-14-2010, 06:43 AM   #6
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
Quote:
Originally Posted by polle54 View Post
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]
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-14-2010, 06:46 AM   #7
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
Quote:
Originally Posted by rowan View Post
Try changing .*google to .*images\.google
google doesnt use images.google.com anymore.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-14-2010, 07:01 AM   #8
rowan
Too lazy to set a custom title
 
Join Date: Mar 2002
Location: Australia
Posts: 17,393
Quote:
Originally Posted by fris View Post
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)
rowan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-14-2010, 07:25 AM   #9
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
ya but when you goto google images in those countries it doesnt use that url
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-14-2010, 11:38 PM   #10
polle54
Confirmed User
 
Join Date: Jul 2004
Location: The Beach
Posts: 4,626
Thanks again, just tried
Code:
RewriteCond %{HTTP_REFERER} !^http://.*google\.(com¦(co\.)?[a-z]{2})/(imgres¦images) [NC]
but that code still redirects everything.
__________________
ICQ# 143561781

Last edited by polle54; 07-14-2010 at 11:39 PM..
polle54 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-17-2010, 08:51 AM   #11
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
Quote:
Originally Posted by polle54 View Post
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 !^
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-19-2010, 03:17 PM   #12
polle54
Confirmed User
 
Join Date: Jul 2004
Location: The Beach
Posts: 4,626
Quote:
Originally Posted by fris View Post
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.
__________________
ICQ# 143561781
polle54 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-19-2010, 04:52 PM   #13
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
ya never used IIS, would have to look into it more, plus ive never really redirected google image traffic.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-19-2010, 04:57 PM   #14
rowan
Too lazy to set a custom title
 
Join Date: Mar 2002
Location: Australia
Posts: 17,393
Quote:
Originally Posted by fris View Post
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.
rowan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-19-2010, 06:03 PM   #15
GrouchyAdmin
Now choke yourself!
 
GrouchyAdmin's Avatar
 
Industry Role:
Join Date: Apr 2006
Posts: 12,085
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 -
__________________
GrouchyAdmin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.