sending all non-English language traffic out
-
Loraine
- Verified Member

- Posts: 48
- Joined: May 13th, 2021, 11:04 pm
sending all non-English language traffic out
Is there a way to send all my non-English language traffic out to one site and the English language traffic to another?
-
Webby
- Verified Member

- Posts: 755
- Joined: November 3rd, 2018, 7:46 pm
-
Abby
- Verified Member

- Posts: 674
- Joined: July 13th, 2018, 10:04 pm
- Title: No man pays my bills
- jag
- Verified Member

- Posts: 6543
- Joined: February 15th, 2018, 9:51 am
- Title: From Malta with love
- Referrals: 1
Not really and it is one of the best
From Malta with love and sunshine
-
Luke
- Verified Member

- Posts: 274
- Joined: May 1st, 2019, 3:37 pm
-
alsporn
- Verified Member

- Posts: 602
- Joined: May 12th, 2018, 4:35 pm
That is a waste of traffic, my 2 cents. Monetize it to paysites.
-
monsta
- Verified Member

- Posts: 1459
- Joined: March 21st, 2018, 3:37 pm
Or even better to a webcams site you promote
- tacnet
- Board Sponsor

- Posts: 3641
- Joined: February 22nd, 2019, 7:21 pm
- Referrals: 9
- Contact:
We use maxmind.com to block individual countries but Im not sure it can do a straight English/Non-English comparison ?
You would have to go through each ISO country code and decide if they speak English and then include the ones you want to re-direct in your javascript like this :-
You would have to go through each ISO country code and decide if they speak English and then include the ones you want to re-direct in your javascript like this :-
Code: Select all
<script type="text/javascript" src="//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js"></script>
<script>
var redirect = (function () {
/* This implements the actual redirection. */
var redirectBrowser = function () {
window.location = "https://www.mydomain.com";
};
/* These are the country codes for the countries we have sites for.
* We will check to see if a visitor is coming from one of these countries.
* If they are, we redirect them to the country-specific site. If not, we
* redirect them to world.example.com */
var sites = {
"de": true,
"in": true,
"it": true,
"pl": true,
"gb": false,
"us": false
};
var onSuccess = function (geoipResponse) {
/* There's no guarantee that a successful response object
* has any particular property, so we need to code defensively. */
if (!geoipResponse.country.iso_code) {
return;
}
/* ISO country codes are in upper case. */
var code = geoipResponse.country.iso_code.toLowerCase();
if ( sites[code] ) {
redirectBrowser();
}
};
/* We don't really care what the error is, we'll send them
* to the default site. */
var onError = function (error) {
return;
};
return function () {
geoip2.country( onSuccess, onError );
};
}());
redirect();
</script> - sarettah
- Verified Member

- Posts: 125
- Joined: January 10th, 2022, 10:39 am
you should be able to do that with htaccess
This should redirect any non english to another url. english traffic falls through to regular site
RewriteEngine On
RewriteCond %{HTTP:Accept-Language} !en [NC]
RewriteRule ^(.*)$ http://nonenglishtrafficgoeshere.com/$1 [L,R=301]
something like that.
Caveat: I am not an htaccess expert by any means
This should redirect any non english to another url. english traffic falls through to regular site
RewriteEngine On
RewriteCond %{HTTP:Accept-Language} !en [NC]
RewriteRule ^(.*)$ http://nonenglishtrafficgoeshere.com/$1 [L,R=301]
something like that.
Caveat: I am not an htaccess expert by any means
- tacnet
- Board Sponsor

- Posts: 3641
- Joined: February 22nd, 2019, 7:21 pm
- Referrals: 9
- Contact:
Actually thats a much better solutionsarettah wrote: ↑July 10th, 2023, 4:01 pmyou should be able to do that with htaccess
This should redirect any non english to another url. english traffic falls through to regular site
RewriteEngine On
RewriteCond %{HTTP:Accept-Language} !en [NC]
RewriteRule ^(.*)$ http://nonenglishtrafficgoeshere.com/$1 [L,R=301]
something like that.
Caveat: I am not an htaccess expert by any means
- BrasSmonkey
- Verified Member

- Posts: 7893
- Joined: February 28th, 2018, 6:31 pm
- Title: Smell My Sack
- Referrals: 1
- Contact:
on wp? use wp geo redirect
THE LAKEN RILEY ACT IS NOW LAW!!! TRUMP 2025!!!
DACA HAS ENDED!!! email: brassballz-@-techie.com
DACA HAS ENDED!!! email: brassballz-@-techie.com
- BOB777
- Verified Member

- Posts: 980
- Joined: September 20th, 2018, 4:24 am
You sound pretty good at it
- viking
- Verified Member

- Posts: 1420
- Joined: March 18th, 2018, 8:28 pm
My man is on the ball
- BrasSmonkey
- Verified Member

- Posts: 7893
- Joined: February 28th, 2018, 6:31 pm
- Title: Smell My Sack
- Referrals: 1
- Contact:
-
razor
- Verified Member

- Posts: 1656
- Joined: March 4th, 2018, 8:34 am
BrasSmonkey wrote: ↑July 12th, 2023, 1:46 pmofficially WP GeoIP Country Redirecti think you could install wp and use it on any of your sites. wp or not
How will a WP Plugin work on a site with no WP?