下面代码的作用是将www.yunxuqiu.com跳转到yunxuqiu.com.注意:用http状态码查询显示为200.所以并不能用于301跳转,如果一定要用,这样有可能会影响到您网站的seo搜索引擎优化。
<script language=javascript>
if (document.domain ==’www.yunxuqiu.com’)
this.location = " http://yunxuqiu.com" + this.location.pathname + this.location.search;
</script>