javascript - Regarding the issue of website redirection, can someone help me find out how this works?
滿天的星座
滿天的星座 2017-06-28 09:22:27
0
2
701

I found a website before. It can only be opened on the built-in browser of QQ mobile phone. This needs to be simple to implement, just judge ua

But I don’t understand the redirection principle of this website

Except for the built-in browser of mobile QQ, any other platform (PC QQ browser, etc.) will prompt a server error within seconds when opening it, and the website cannot be opened

I used a computer to simulate ua on my mobile phone's QQ browser to access it and saved its website source code, but I couldn't find where the js code for ua that it judged was, and after I opened the saved source code locally, it I don’t judge ua anymore (except for not judging ua, all other functions are normal). I am not good at learning and I really don’t understand. Please give me some answers~~

The author of the previous website has closed it down. I only have its source code. Can anyone help me check it out? There are red envelopes~~~

滿天的星座
滿天的星座

reply all(2)
洪涛

Explain that the process of judging ua is performed in the server-side code.

typecho

Isn’t UA part of the http head? Back-end languages ​​can be obtained and used to make judgments.

In fact, there is no need to execute the program to the language level. You can get it from http servers like apache and nginx to make a judgment.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!