Change the URL to ?fromauth=1
, and then you can use JavaScript to read the page URL:
var URLString = window.location.href;
var URL = new URL(URLString);
var fromauth = URL.searchParams.get("fromauth");
if (fromauth != 1){
window.location.replace("http://www.mywebsite.com/login");
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…