我想知道,如果有人可以幫助我,我有以下的在我的網站的JavaScript代碼:document.referrer幫助的Javascript
<body onload="if (document.referrer == '') self.location='https://www.thisisanexampleofmysiteurl.com';">
但如果有那麼它包含了一個修改它的方式我想知道規則的例外。例如,如果用戶直接在url中鍵入,他們將被髮送到https://www.thisisanexampleofmysiteurl.com,但是如果他們是從URL縮寫器(稱爲fakeexample.com)引用,那麼實際的網頁將加載而不是https://www.thisisanexampleofmysiteurl.com
希望這是有道理的有人可以提供幫助。
感謝,
小號
重定向不會設置'document.referrer',所以沒有辦法告訴你通過來自縮寫器的重定向來到頁面。 – Barmar