域重定向和 url 屏蔽
Domain redirection and url masking
上传的图片显示的是facebook的post预览缩略图。
(1)考虑重定向到 y.com/xyz[= 的 link x.com/abc 39=].
(2)当 link x.com/abc 在 Facebook 上分享时,它的预览是从 y.com/xyz.
(3)facebook 生成的预览缩略图包含域 y.com 而不是 x.com .
(4)我们如何让预览缩略图显示 x.com 而不是目标 url y.com .
我在 url hivirality.com/abhishek 上分享的 facebook 屏幕截图显示在 citryxsolutions.in[= 上重定向39=] 但预览缩略图包含目标 url 的域名,即 citryxsolutions.in.
解决问题的可能情况是什么。
你可以做到,但这有点棘手。而不是从 x.com/abc
到 y.com/xyz
的 301 重定向。您的服务器应该 return HTML,这将通过 JS 重定向用户。这个 HTML 应该有 Facebook 正在解析的 Open Graph 标记。例如:
<!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>
其中 URL
是 x.com/abc
而DESTINATION URL
是y.com/xyz
您可以在 FB 调试器中查看 Facebook 对此的反应(您也可以在此处清除缓存):https://developers.facebook.com/tools/debug/
上传的图片显示的是facebook的post预览缩略图。
(1)考虑重定向到 y.com/xyz[= 的 link x.com/abc 39=].
(2)当 link x.com/abc 在 Facebook 上分享时,它的预览是从 y.com/xyz.
(3)facebook 生成的预览缩略图包含域 y.com 而不是 x.com .
(4)我们如何让预览缩略图显示 x.com 而不是目标 url y.com .
我在 url hivirality.com/abhishek 上分享的 facebook 屏幕截图显示在 citryxsolutions.in[= 上重定向39=] 但预览缩略图包含目标 url 的域名,即 citryxsolutions.in.
解决问题的可能情况是什么。
你可以做到,但这有点棘手。而不是从 x.com/abc
到 y.com/xyz
的 301 重定向。您的服务器应该 return HTML,这将通过 JS 重定向用户。这个 HTML 应该有 Facebook 正在解析的 Open Graph 标记。例如:
<!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>
其中 URL
是 x.com/abc
而DESTINATION URL
是y.com/xyz
您可以在 FB 调试器中查看 Facebook 对此的反应(您也可以在此处清除缓存):https://developers.facebook.com/tools/debug/