我正在尝试重定向 Google Firebase 自定义托管域。
来自特定域的重定向应该转到特定的一方: 假设来自https://domain1.com的重定向应该重定向到 https://domain2.com/login.html 并来自https://domain3.com重定向到 https://domain2.com/Log.html
<script>
window.onload = function() {
if (document.referrer !== "https://domain1.com/") {
document.location.href = "https://goTOdomain1.com";
}
else if (document.referrer !== "https://domain2.com") {
document.location.href = "https://goTOdomain1.com/login.html";
}
else {
document.location.href = "https://goTOdomain1.com/404.html";
}
</script>
在那之后,我无法在 firebase 中的 PHP 中执行任何东西,我有点卡住了。