Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 10th Jun 2012, 01:26 PM   #1
Cool Warrior
 
frankweerasinghe's Avatar
 
Join Date: 2010
Location: Colombo, Sri Lanka
Posts: 120
Thanks: 18
Thanked 22 Times in 13 Posts
Arrow
Redirect URL except GoogleBot? Please Help!
Share on: 
fb share twitter share gplus share more share

I have a highly rank post on my blog and I just wanna redirect it to my clickbank affiliate link without losing my rankings. So I need to do this with htaccess file. First it must check the USER AGENT... then it must check is there any "google" word on that user agent string. If not, it should redirect user to my aff. link. So far I tried following code without any success.


RewriteCond %{HTTP_USER_AGENT} ^((?!google).)*$
RewriteRule http://www.myblog.com/post-url/ http://www.myafflink.com/ [R=301,L]

Please help.

2CO.ME Premium Domain For Sale!
~ Great For Your Own URL Shortener Website ~
Just Send Me a PM! :)
frankweerasinghe is offline  
Unread 11th Jun 2012, 12:01 AM   #2
Warrior Member
 
Join Date: 2012
Posts: 22
Thanks: 0
Thanked 1 Time in 1 Post
Default
Re: Redirect URL except GoogleBot? Please Help!
Share on: 
fb share twitter share gplus share more share

Singling out Google should be Blackhat SEO technique. I think your site will be penalized for it if Google detects it.
raggupta2 is offline  
Unread 11th Jun 2012, 08:35 AM   #3
VIP Warrior
 
mojojuju's Avatar
 
Join Date: 2005
Location: Potemkin Village
Posts: 1,724
Thanks: 745
Thanked 742 Times in 498 Posts
Default
Re: Redirect URL except GoogleBot? Please Help!
Share on: 
fb share twitter share gplus share more share

raggupta2 is correct. You are not the first person to come up with this clever idea. Google will find out if you try to emply such shennanigans.

:)
mojojuju is offline  
Unread 11th Jun 2012, 10:24 AM   #4
Cool Warrior
 
frankweerasinghe's Avatar
 
Join Date: 2010
Location: Colombo, Sri Lanka
Posts: 120
Thanks: 18
Thanked 22 Times in 13 Posts
Default
Re: Redirect URL except GoogleBot? Please Help!
Share on: 
fb share twitter share gplus share more share

anyone yep. I will take the risk...

2CO.ME Premium Domain For Sale!
~ Great For Your Own URL Shortener Website ~
Just Send Me a PM! :)
frankweerasinghe is offline  
Unread 11th Jun 2012, 11:20 AM   #5
Warrior Member
 
Join Date: 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: Redirect URL except GoogleBot? Please Help!
Share on: 
fb share twitter share gplus share more share

thanks to post

taiavatar is offline  
Unread 11th Jun 2012, 01:07 PM   #6
Active Warrior
 
Join Date: 2012
Location: Scotland
Posts: 42
Thanks: 1
Thanked 9 Times in 9 Posts
Default
Re: Redirect URL except GoogleBot? Please Help!
Share on: 
fb share twitter share gplus share more share

As pointed out - this is not recommended, but if you wanted to redirect to a certain page based on the referrer such as google.com, google.co.uk etc, I've just tested this and it works:

RewriteCond %{http_referer} google [NC]
RewriteRule ^$ YOUR FULL URL [R=302,L]

Web strategist and adventurer. Director of Search Engine Friendly Hosting. ---Fast, affordable, feature packed hosting from £1.97. --- Search Engine Friendly Web Hosting

[VIDEO] How to set up a WordPress blog in under 10 minutes.
JezWebb is offline  
The Following User Says Thank You to JezWebb For This Useful Post:
Unread 13th Jun 2012, 08:45 PM   #7
Cool Warrior
 
frankweerasinghe's Avatar
 
Join Date: 2010
Location: Colombo, Sri Lanka
Posts: 120
Thanks: 18
Thanked 22 Times in 13 Posts
Default
Re: Redirect URL except GoogleBot? Please Help!
Share on: 
fb share twitter share gplus share more share

Originally Posted by JezWebb View Post

As pointed out - this is not recommended, but if you wanted to redirect to a certain page based on the referrer such as google.com, google.co.uk etc, I've just tested this and it works:

RewriteCond %{http_referer} google [NC]
RewriteRule ^$ YOUR FULL URL [R=302,L]
replacing http_referer with user_agent will do the trick? :rolleyes:

2CO.ME Premium Domain For Sale!
~ Great For Your Own URL Shortener Website ~
Just Send Me a PM! :)
frankweerasinghe is offline  
Closed Thread


Bookmarks

Tags
googlebot, redirect, url


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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 02:12 AM.