多域名绑定一个空间的方法
最近搞了一个学校的查询成绩程序,寒假里访问蛮高的,就想想放一个阿里妈妈的广告,但是http://hengtian.nyist.net的阿里妈妈已经被网站里的前辈注册过了,现在这个查询页面有新的域名是http://chengo.info,但是问题出来了,有相当一部分同学只知道http://hengtian.nyist.net/zwy/chengji这个页面,不知道新的域名,所以很多时间并不能正常显示阿里妈妈的广告,最近正在学习javascript,就写了一个代码,成功了,大家可以看下。
<script language=“javascript” type=“text/javascript”>
if(location.toString().indexOf(“http://hengtian.nyist.net/zwy/chengji”)!= -1)
{
location.href=“http://chengo.info”
}
if(location.toString().indexOf(“http://hengtian.nyist.net/zwy/chengji”)!= -1)
{
location.href=“http://chengo.info”
}
</script>

3 条评论
.htaccess不就可以解决吗?
Some specialists argue that mortgage loans help a lot of people to live the way they want, because they can feel free to buy necessary stuff. Moreover, different banks give car loan for different persons.