if(location.hostname=='www.def.com')top.location='http://www.abc.com'+location.pathname+location.search;
[quote=引用 1 楼 jslang 的回复:] 用js的实现的话。要在所有页面中都添加 if (location.href.indexOf("www.def.com")>=0) location.href=location.href.replace("www.def.com","www.abc.com") 不过最好的方法是在服务器对http://www.def.com设置地址映射
用js的实现的话。要在所有页面中都添加 if (location.href.indexOf("www.def.com")>=0) location.href=location.href.replace("www.def.com","www.abc.com") 不过最好的方法是在服务器对http://www.def.com设置地址映射
87,922
社区成员
224,618
社区内容
加载中
试试用AI创作助手写篇文章吧