我需要重定向页面,同时保留原始页面(不是重定向到的页面)共享标题和描述以及图标。
所以在这个例子中,Whatsapp等中的共享预览会说Title而不是Google。
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Title</title>
<meta name="description" content="Download now">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="manifest" href="site.webmanifest">
<link rel="apple-touch-icon" href="icon.png">
<!-- Place favicon.ico in the root directory -->
</head>
<body>
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: google.com");
?>
</body>
</html>