我想在Blogger上进行302重定向,但是我在网上找到的代码即使有效也不会传输链接源。我在做什么错了?
<meta charset='utf-8'/>
<meta content='0;url=https://www.yournewsite.com/' http-equiv='refresh'/>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<link href='https://www.yournewsite.com/' rel='canonical'/>
</b:if>
答案 0 :(得分:0)
我很漂亮Blogger是一项非常强大的服务,其中包含一些用于重定向的内容。
不过,您可以在此处将此内容添加到页面的顶部,<head>
JavaScript
<script>
window.location.replace("http://www.example.com");
</script>
基于HTML
<head>
<meta http-equiv="refresh" content="0;
url=http://example.com/" />
</head>
它应该在访问脚本后立即执行,因此甚至在页面完全加载之前都进行重定向。
编辑 抱歉,很抱歉,您没有看到您特别需要302重定向。