`
feijing
  • 浏览: 19834 次
  • 性别: Icon_minigender_1
最近访客 更多访客>>
社区版块
存档分类
最新评论

301页面重定向

    博客分类:
  • http
阅读更多
asp
<%@ Language=VBScript %>
<%
Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”, “http://www.0371loan.com/News/”
%>
ASP.Net下的301转向代码
<script runat=”server”>
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = “301 Moved Permanently”;
Response.AddHeader(”Location”,”http://www.wdydkw.com/“);
}
</script>
PHP下的301转向代码
header(”HTTP/1.1 301 Moved Permanently”);
header(”Location: http://www.baidu.com/sss/”);
exit();
CGI Perl下的301转向代码
$q = new CGI;
print $q->redirect(”http://www.baidu.com/sss/”);
JSP下的301转向代码
<%
response.setStatus(301);
response.setHeader( “Location”, “http://www.baidu.com/sss/” );
response.setHeader( “Connection”, “close” );
%>
一般设置在默认文件下
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics