首頁  >  文章  >  web前端  >  静态页如何做301重定向??_html/css_WEB-ITnose

静态页如何做301重定向??_html/css_WEB-ITnose

WBOY
WBOY原創
2016-06-24 12:22:361043瀏覽

XXX.com 定向到 www.XXX.com
不使用iis


回复讨论(解决方案)

this.location = "http://www.baidu.com";

this.location = "http://www.baidu.com";
用js嘛?详细点


this.location = "http://www.baidu.com";
用js嘛?详细点
是用JS,就简单地这样一句话
这种方式貌似只能302而不是301
可以考虑结合后台程序使用



this.location = "http://www.baidu.com";
用js嘛?详细点
是用JS,就简单地这样一句话
这种方式貌似只能302而不是301
可以考虑结合后台程序使用
我使用.net 做的  程序怎么弄啊。




this.location = "http://www.baidu.com";
用js嘛?详细点
是用JS,就简单地这样一句话
这种方式貌似只能302而不是301
可以考虑结合后台程序使用
我使用.net 做的  程序怎么弄啊。

Response.Status="301 Moved Permanently" Response.StatusCode = 301;Response.Headers.Add("Location","http://www.baidu.com");

Response.Status = "301 Moved Permanently";Response.StatusCode = 301;Response.Headers.Add("Location","http://www.baidu.com");

少写了个引号

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn