#
网站源码 2023年10月24日

全网最全的HTML网页跳转代码大全 网页自动跳转代码

By 壹资源网 5 MIN READ

很多新手在学习网站建设的时候,不清楚网页跳转代码怎么写?也就是从一个网页跳转到另外一个网页或网站,下面IT备忘录小编就给大家分享一份比较全面的网页自动跳转代码大全给大家,欢迎大家采纳!

html直接跳转网址代码 自动跳转到其他网站代码

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

2、HTML网页直接跳转代码

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

3、PHP网页跳转代码

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

4、JavaScript网页跳转代码

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

5、Apache(301)跳转代码

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

6、ASP网页跳转代码

<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","https://www.iezyw.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.iezyw.com);
}

8、Perl跳转代码

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

9、Pyton跳转代码

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

10、Nginx 301网页跳转代码

if ($host ~ '^iezyw.com'){
return 301 https://www.iezyw.com$request_uri;
}

以上是HTML最全网页跳转代码,大家根据自己的情况复制粘贴使用,只需要修改跳转网址即可。



免责声明

站点信息:本站网址:https://www.iezyw.com | 资源解压密码:@iezyw.com

性质说明:资源源于网络收集,本站收取的费用仅为收集与整理的人工成本,并非资源本身之售价。

版权声明:内容仅供学习参考,如有侵权请联系邮箱 admin@iezyw.com,我们将及时处理。

免责条款:资源不代表本站立场,本站不对其观点及真实性负责,请用户自行甄别。

合规声明:严禁以任何方式发布或转载违法规信息,访客发现请向站长举报。

资源维护:资源多为云盘存储,如遇链接失效,请发邮件给到我们,我们会及时更新。

😢 检测到广告拦截

您好,我们检测到您使用了广告拦截插件。

本站坚持分享优质资源,广告收入是我们持续更新的唯一动力。

恳请将本站加入白名单,支持我们继续"用爱发电"!