Home IP based redirection on our website
Reply: 1

IP based redirection on our website

LSM
1#
LSM Published in 2017-12-07 14:03:08Z

We would like to have a middle east version as well as an international version for our website. The middle east version would be like:

domain.com/me/home

and the international version would be like:

domain.com/home

However, it's not only the home page that we want to redirect. We want a lot more pages on our website to be redirected as well. Why do we need to redirect other pages? Because if a person has a direct URL such as

domain.com/page1

we want them to go to

domain.com/me/page1

The developer that we contacted said that it is easy to redirect the home page, but if we try to do that for many other pages, it would seriously slow down the site. The main reason he mentioned was because each page would have to go through an IP check.

Is there a way to accomplish this without a serious hit on our site speed?

I hope my question was clear enough.

Thank you in advance.

Michael C.
2#
Michael C. Reply to 2017-12-08 01:53:15Z

This is not true. You just need to query the geolocation information once per IP address and then stores it in session. In this case, you do not need to query every page for the same visitor.

Below is one example of performing redirection using PHP and MySQL.

https://www.ip2location.com/tutorials/redirect-web-visitors-by-country-using-php-and-mysql-database

You can get the free database from https://lite.ip2location.com

I hope this free solution help your developers.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.309345 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO