![]() |
Any HTACCESS People In The House?
Code:
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(US|CA|CN|RU|BR|JP|PK|SA|ID|BY|IR|IQ)$ So the question is..... how do I use this code without redirecting search engine spiders such as Google. I found this advice: https://www.webmasterworld.com/apache/4276815.htm Above URL suggests it is best to: (1) Not redirect search engine spiders (2) Not redirect the google IP number set Using both options will be the safest bet but I'm a complete novice so I don't fully understand the advice. Anyone know how we need to edit this code to make it work as required? Nice little crossword puzzle for ya.... |
just add an agent rule against the know bots
|
Well if I just take the code from the above page, I get something like this code:
Does it look like it would work? Code:
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(US|CA|CN|RU|BR|JP|PK|SA|ID|BY|IR|IQ)$ |
Take out the US in the htacess. Then use a JS redirect for US on the site pages...
|
Quote:
|
Quote:
You can use this generator Block Visitors by Country | IP2Location.com Here are the bots ranges Robots IP Address Ranges - Googlebot, Yahoo Slurp, MSNBot |
Quote:
So it that domain a throw away blackhat domain? |
Google now crawls from international IPs as well, by the way.
|
Quote:
Quote:
So for our redirect to work, we need to not redirect search engines (primarily Bing & Google). |
<link rel="alternate" href="http:///path/" hreflang="x-default">
<link rel="alternate" href="http:///path/" hreflang="en"> <link rel="alternate" href="http:///path/" hreflang="ru"> <link rel="alternate" href="http:///path/" hreflang="de"> <link rel="alternate" href="http:///path/" hreflang="pl"> <link rel="alternate" href="http:///path/" hreflang="es"> </head> Let the googlebot find the right content. Let your users select their right language. That is the right way to do it. Set a language cookie for the user if you want continuity. This redirect crap is way overused and unnecessary IMHO. |
All times are GMT -7. The time now is 12:32 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123