| | #1 |
| Cool Warrior Join Date: 2010 Location: Colombo, Sri Lanka
Posts: 120
Thanks: 18
Thanked 22 Times in 13 Posts
|
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! :) | |
| |
| | #2 |
| Warrior Member Join Date: 2012
Posts: 22
Thanks: 0
Thanked 1 Time in 1 Post
|
Singling out Google should be Blackhat SEO technique. I think your site will be penalized for it if Google detects it.
|
| |
| | #3 |
| VIP Warrior Join Date: 2005 Location: Potemkin Village
Posts: 1,724
Thanks: 745
Thanked 742 Times in 498 Posts
|
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.
|
|
:)
| |
| |
| | #4 |
| Cool Warrior Join Date: 2010 Location: Colombo, Sri Lanka
Posts: 120
Thanks: 18
Thanked 22 Times in 13 Posts
|
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! :) | |
| |
| | #5 |
| Warrior Member Join Date: 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
thanks to post |
| | |
| |
| | #6 |
| Active Warrior Join Date: 2012 Location: Scotland
Posts: 42
Thanks: 1
Thanked 9 Times in 9 Posts
|
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. | |
| |
| The Following User Says Thank You to JezWebb For This Useful Post: |
| | #7 |
| Cool Warrior Join Date: 2010 Location: Colombo, Sri Lanka
Posts: 120
Thanks: 18
Thanked 22 Times in 13 Posts
|
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! :) | |
| |
|
| Bookmarks |
| Tags |
| googlebot, redirect, url |
| |