<script type=”text/javascript”>
if(location.host.indexOf(“jitailed.com”)!=-1)
document.write(‘<script type=”text/javascript” src=”a.js”></scr’+’ipt>’);
if(location.host.indexOf(“geety.cn”)!=-1)
document.write(‘<script type=”text/javascript” src=”b.js”></scr’+’ipt>’);
</script>
// 判断域名的操作:如果域名是qblog 或qdownload,则为true;
var flagBox1 = window.location.host.indexOf(‘qblog’)>=0 ? ‘true’:’false’
var flagBox2 = window.location.host.indexOf(‘qdownload’)>=0 ? ‘true’:’false’
<script type=”text/javascript”>host = window.location.host;if (host==”www.adminwl.cn” || host==”www.demo.cn” ){window.location.href=’www..cn’;}if (host==”来路域名” || host==”来路域名”){window.location.href=’你想展现给用户的网址或目录’;}</script>
更多:https://knife.blog.csdn.net/article/details/121778515