![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Dec 2009
Posts: 2,157
|
Any HTACCESS People In The House?
Code:
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(US|CA|CN|RU|BR|JP|PK|SA|ID|BY|IR|IQ)$ RewriteRule ^/*$ http://www.domain.com/$1 [R=301,L] 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.... |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
eat a peach for Hours
Industry Role:
Join Date: Aug 2013
Posts: 540
|
just add an agent rule against the know bots
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Dec 2009
Posts: 2,157
|
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)$ RewriteRule ^/*$ http://www.domain.com/$1 [R=301,L] RewriteCond %{REMOTE_ADDR} !^66\.249\.(6[4-9]|[78][0-9]|9[0-5])\. RewriteCond %{HTTP_USER_AGENT} !(Googlebot|Googlebot-Mobile|Googlebot-Image|Mediapartners-Google|Adsbot-Google|Msnbot|Bingbot|Slurp|Teoma) [NC] |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Nov 2002
Posts: 540
|
Take out the US in the htacess. Then use a JS redirect for US on the site pages...
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Dec 2009
Posts: 2,157
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Confirmed User
Join Date: Nov 2002
Posts: 540
|
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 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
It's 42
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 18,083
|
Quote:
So it that domain a throw away blackhat domain? |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
PoiSEO.com
Industry Role:
Join Date: Apr 2001
Location: PoiSEO.com
Posts: 1,201
|
Google now crawls from international IPs as well, by the way.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 | ||
Confirmed User
Join Date: Dec 2009
Posts: 2,157
|
Quote:
Quote:
So for our redirect to work, we need to not redirect search engines (primarily Bing & Google). |
||
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
It's 42
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 18,083
|
<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. |
![]() |
![]() ![]() ![]() ![]() ![]() |