N
N
nichvlas2016-11-09 08:27:16
JavaScript
nichvlas, 2016-11-09 08:27:16

How to make a redirect for specific ip using js?

How to determine the ip address using js and make a redirect? For American ip redirect should not be.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan, 2016-11-09
@LiguidCool

You can make an ajax request to the server. The server populates headers and sends IP (or info on the transition).

Z
Zakhar Storozhuk, 2016-11-09
@Phell

If it is not possible to use htaccess, then send a request to the PHP script with AJAX and do whatever you want there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question