Home  >  Article  >  Web Front-end  >  静态页如何做301重定向??_html/css_WEB-ITnose

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

WBOY
WBOYOriginal
2016-06-24 12:22:361043browse

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");

少写了个引号

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn