用asp实现301永久重定向

搜索引擎优化 04-26 阅读:160 评论:0

 <%@ Language=VBScript %>

<%

Response.Status="301 Moved Permanently"

Response.AddHeader "Location","http://www.heku.org/"

Response.End

%>

完全复制以上的asp代码.创建asp文件,替换需要重定向的文件. (或者创建index.asp用来重定向某个目录.)

 

php的重定向代码如下: ps:未经验证.

 

header("HTTP/1.1 301 Moved Permanently");

header("Location:http://www.yoursite.com/");

exit();