Redirect 域重定向和url屏蔽
上传的图片显示了facebook的后期预览缩略图 (1) 考虑一个链接x.com/abc,该链接被重定向到y.com/xyz (2) 当链接x.com/abc在facebook上共享时,其预览将从y.com/xyz获取 (3) facebook生成的预览缩略图包含域y.com,而不是x.com (4) 如何使预览缩略图显示x.com,而不是目标urly.com facebook截图显示,我共享了urlhivirality.com/abhishek,该url被重定向到citryxsolutions.in,但预览缩略图包含目标url的域名,即citryxsolutions.inRedirect 域重定向和url屏蔽,redirect,url-rewriting,url-routing,url-redirection,Redirect,Url Rewriting,Url Routing,Url Redirection,上传的图片显示了facebook的后期预览缩略图 (1) 考虑一个链接x.com/abc,该链接被重定向到y.com/xyz (2) 当链接x.com/abc在facebook上共享时,其预览将从y.com/xyz获取 (3) facebook生成的预览缩略图包含域y.com,而不是x.com (4) 如何使预览缩略图显示x.com,而不是目标urly.com facebook截图显示,我共享了urlhivirality.com/abhishek,该url被重定向到citryxsolutions
有哪些情况可以解决此问题。您可以这样做,但这有点棘手。而不是301从
x.com/abc
重定向到y.com/xyz
。您的服务器应该返回HTML,它将通过JS重定向用户。这个HTML应该有Facebook正在解析的开放图形标记。例如:
<!doctype html>
<html lang='en'>
<head>
<meta charset="utf-8" />
<meta property="og:url" content="URL" />
<meta property="og:title" content="TITLE" />
<meta property="og:type" content="website" />
<meta property="og:description" content="DESCRIPTION" />
<meta property="og:image" content="IMAGE URL" />
</head>
<body>
<script type="text/javascript">
if("false" == "false") {
window.location = "DESTINATION URL";
}
</script>
</body>
</html>
如果(“假”=“假”){
window.location=“目标URL”;
}
其中URL
是x.com/abc
而目标URL
是y.com/xyz
您可以在FB debugger中查看Facebook对此的反应(也可以在此处清除缓存):