したがって、以下の現在のスクリプトを使用しています。
<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>
これは正常に機能しますが、別の条件を追加したい
URL が http://www.nationalforestteachingschool.co.ukの場合、次のページに移動します。
https://thevault.jths.co.uk/index.phtml?d=550968
私はelse ifコマンドを試しましたが、うまくいかないようです.これは1つの連続したスクリプトにする必要があります.