重定向到指定的页面

100次阅读
没有评论

public/theme/default

<script>
    // 获取当前页面的域名
    var currentDomain = window.location.hostname;
 
    // 判断域名并进行相应的重定向
    if (currentDomain.includes('xx.xx.xx')) {
        window.location.href = 'https://xx';
    } else {
        window.location.href = 'https://xx';
    }
</script>
正文完
 0
评论(没有评论)