简体   繁体   中英

How do I show a specific web page to a specific user

Suppose I have made 2 static web pages and hosted them using virtual host. Let the names be example.com/page1.html and example.com/page2.html .

Now user A has his own unique browser with a unique USER_AGENT string. I have to make sure that when the user A tries to access example.com from his browser, he will be shown example.com/page2.html .

If anyone else tries to access the URL, they should be shown example.com/page1

Please someone help me out with this problem.

UPDATE 1

This can be done inculcating the USER_ACCESS string.

Dude you should use a backend programming language for that (PHP o JS with nodeJs) but in your case maybe you could ask a to the user a User and Password and baded on that rou could validate it using an if with Javascript and then redirect to website A or B or Not if user and/or Password are wrong.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM