E
E
Eugene2016-11-27 09:17:22
linux
Eugene, 2016-11-27 09:17:22

How to make a redirect to the desired site in nginx depending on the IP?

There are 2 sites
www.exsample.com/ms/
www.exsample.com/nv/
how to make it so that when accessing www.exsample.com, the user's IP address is determined and if it falls into the IP range of the city, it redirects to www.exsample. com/nv, if this IP does not fall within the range of the city, then opens www.exsample.com/ms/
on the nginx server

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2016-11-27
@Juodvirshis

https://www.cyberciti.biz/faq/nginx-redirect-backe...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question