<script language="javascript">
var url=unescape(window.location.href);
if(url.indexOf('zhouhaihe.com')>0)
{
top.location.href='/bird/';
}
</script>
var url=unescape(window.location.href);
if(url.indexOf('zhouhaihe.com')>0)
{
top.location.href='/bird/';
}
</script>
在你的首页插入以上代码就可以了
在地址栏里输入 www.zhouhaihe.com或zhouhaihe.com 都会转到 http://www.zhouhaihe.com/bird/ 目录下
输入主域名时 将正常
以上javascript转址有可能会影响到搜索引擎的搜录
如果首页是asp页面可以使用以下代码
http=request.ServerVariables("HTTP_HOST")
if Instr(http,"zhouhaihe.com")>0 then
response.Redirect("/bird/")
response.End()
end if
if Instr(http,"zhouhaihe.com")>0 then
response.Redirect("/bird/")
response.End()
end if