【笔记】简单的单页301HTML/PHP代码,可带title标题
html版本
<head>
<title>网页标题</title>
<meta http-equiv="refresh" content="0; url=https://xxx.com">
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
</head>
<body>
</body>
php版本
<?php
//重定向浏览器
header("HTTP/1.1 301 Moved Permanently");
header("Location: https://www.xxx.com/");
//确保重定向后,后续代码不会被执行
exit;
?>