侧边栏壁纸
博主头像
武陵博客 博主等级

一心一意,持之以恒

  • 累计撰写 7 篇文章
  • 累计创建 8 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

网站自动跳转代码

admin
2024-12-16 / 0 评论 / 0 点赞 / 14 阅读 / 0 字
温馨提示:
部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

1.HTML方式(可隐藏跳转后网址)

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>武陵博客</title>
<frameset framespacing="0" border="0" rows="0" frameborder="0">
<frame name="main" src="https://www.wlbk.com" scrolling="auto" noresize></frameset>
</head>
<body></body>
</html>

2.HTML

<meta http-equiv="refresh" content="0; url=https://www.wlbk.com">

3.PHP

<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: https://www.wlbk.com");
exit();
?>

4.JavaScript

<script language="javascript">
top.location='https://www.wlbk.com';
</script>

5.Apache(301)

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) https://www.wlbk.com$1 [R=301,L]

6.ASP

<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","https://www.wlbk.com"
Response.End
%>

7.ASP.NET(301)

<%@ Page Language="C#" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
HttpContext.Current.Response.StatusCode = 301;
HttpContext.Current.Response.Status = "301 Moved Permanently";
HttpContext.Current.Response.AddHeader("Location", https://www.wlbk.com);
}
</script>

8.Perl

$q = new CGI;
print $q->redirect("https://www.wlbk.com");

9.Pyton

from django import http
def view(request):
return http.HttpResponseRedirect('https://www.wlbk.com')

0

评论区