所以我在下面使用这个当前脚本:
<script type="text/javascript">
if (window.location.href.indexOf('thevault') > -1) {
//window.location = 'http://thevault.co.uk/index.phtml?d=512060’;
window.location = '/index.phtml?d=512060';
} else {
//window.location = 'http://www.jths.co.uk/index.phtml?d=541300';
window.location = '/index.phtml?d=541300';
}
</script>
效果很好,但是我想添加另一个条件
如果网址是: http://www.nationalforestteachingschool.co.uk,则转到此页面:
https://thevault.jths.co.uk/index.phtml?d=550968
我已经尝试过 else if 命令,但似乎无法让它工作,这需要在一个连续的脚本中,有什么想法吗?