HTML网页自动跳转代码

作者:无名哥哥 发布时间:2023-8-26 浏览次数:238 8/26

以下各类HTML语言网页跳转代码,直接复制即可使用,(记得把网址修改成自已需要的)。

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.aiyuai.cn/" scrolling="auto" noresize></frameset>
</head>
<body></body>
</html>

HTML网页直接跳转代码

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

PHP网页跳转代码

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

JavaScript网页跳转代码

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

Apache(301)跳转代码

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

ASP网页跳转代码

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

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.aiyuai.cn);
}

Perl跳转代码

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

9.

Pyton跳转代码

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

10.

Nginx 301网页跳转代码

if ($host ~ '^itmemo.cn'){
    return 301 https://www.aiyuai.cn$request_uri;
}

 

- THE END -

本文来源:原文来自IT备忘录  |  本站部分文章来源于网络,若侵犯了您的权益,请附说明联系删除

共有 1 条评论

  1. 夜空中的大爷

    🤑 🤑 🤑 🤑 🤑 🤑 🤑 🤑 🤑 🤑 🤑