Htaccess redirect based on country of origin
Htaccess redirect based on country of origin - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the Htaccess redirect based on country of origin error on your web browser. Problem :
Solution :
We hope that this article has helped you resolve the htaccess, redirects, country-specific error in your web browsers. Enjoy browsing the internet uninterrupted!
Can a rule that filters and redirect traffic based on country of origin be implemented in .htaccess?
Can it be implemented in any other way then by an IP address? I need the solution to be as accurate as possible.
Maybe this link (how to redirect domain according to country IP address) can help you.
I think, however, that this is not a good practice.
Redirection by language or country is quite strict. It is better preferred:
- A message at the top of your site that influence the visitor to go to
the page built with his language. - A system that can easily change the language (flags)
This is only my opinion.
Yes, we used to filter visitors from Nigeria by .htaccess:
RewriteEngine On
RewriteCond %ENV:IP2LOCATION_COUNTRY_SHORT ^NG$
RewriteRule ^(.*)$ http://www.google.com [L]
You can generate your own at http://ip2location.com/free/visitor-redirection .
Comments
Post a Comment