Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wordpress 如何修复linkedin随机不显示共享帖子图片的问题?_Wordpress_Linkedin - Fatal编程技术网

Wordpress 如何修复linkedin随机不显示共享帖子图片的问题?

Wordpress 如何修复linkedin随机不显示共享帖子图片的问题?,wordpress,linkedin,Wordpress,Linkedin,我有一个带有blog2social插件的wordpress网站。当我们写一篇文章时,这个插件会分享文章摘录和图片,并链接到社交媒体。 图像大小为1000x500。我看到linkedin要求1.91:1的比例。因此,我将我的模板php和css文件更改为1000x525。但问题是,即使使用1000x500像素,随机图像也能正确共享。但大多数情况下,都会选择1x1像素进行图像后期处理。而不是实际的后功能图像。 我还让我们在我的服务器上加密ssl,所以我在一些主题中读到,可能ssl连接是个问题。但是,如

我有一个带有blog2social插件的wordpress网站。当我们写一篇文章时,这个插件会分享文章摘录和图片,并链接到社交媒体。 图像大小为1000x500。我看到linkedin要求1.91:1的比例。因此,我将我的模板php和css文件更改为1000x525。但问题是,即使使用1000x500像素,随机图像也能正确共享。但大多数情况下,都会选择1x1像素进行图像后期处理。而不是实际的后功能图像。 我还让我们在我的服务器上加密ssl,所以我在一些主题中读到,可能ssl连接是个问题。但是,如果这些都是问题,那么为什么有些帖子会被正确的图片分享呢? 我还尝试了链接ispector,它从og:image中选择了正确的图像

所以所有帖子的图片大小都是一样的。有些帖子共享和查看正确,有些帖子显示灰色块而不是图像

我允许linkedin IP v4列表出现在我的服务器防火墙中。所以可能没有连接问题。 元标记是正确的。链接检查器显示正确的OG:图像格式

我该怎么办

尝试链接ispector,尝试调整图像大小。尝试允许linkedin cdn ip范围

<meta property="og:image" content="https://---domain---/wp-content/uploads/2019/04/2019-04-05.png">
<meta property="og:image:secure_url" content="https://---domain---/wp-content/uploads/2019/04/2019-04-05.png">
<meta name="twitter:image" content="https://---domain---/wp-content/uploads/2019/04/2019-04-05.png">
<meta property="og:image" content="https://---domain---/wp-content/uploads/2019/04/2019-04-05.png">

其他社交媒体,如Facebook、twitter、Instagram、telegram,都在毫无问题地展示图片。只是随机链接失败。

我有一个wordpress防火墙和安全插件。并在其中启用了5g规则。我禁用了一些规则。linkedin图像也开始起作用。我想这条htaccess规则是如何阻止linkedin爬虫的。但不是twitter、facebook或insta:

#AIOWPS_SIX_G_BLACKLIST_END
#AIOWPS_FIVE_G_BLACKLIST_START
# 5G BLACKLIST/FIREWALL (2013)
# @ http://perishablepress.com/5g-blacklist-2013/

# 5G:[QUERY STRINGS]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} (\"|%22).*(<|>|%3) [NC,OR]
RewriteCond %{QUERY_STRING} (javascript:).*(\;) [NC,OR]
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3) [NC,OR]
RewriteCond %{QUERY_STRING} (\\|\.\./|`|='$|=%27$) [NC,OR]
RewriteCond %{QUERY_STRING} (\;|'|\"|%22).*(union|select|insert|drop|update|md5|benchmark|or|and|if) [NC,OR]
RewriteCond %{QUERY_STRING} (base64_encode|localhost|mosconfig) [NC,OR]
RewriteCond %{QUERY_STRING} (boot\.ini|echo.*kae|etc/passwd) [NC,OR]
RewriteCond %{QUERY_STRING} (GLOBALS|REQUEST)(=|\[|%) [NC]
RewriteRule .* - [F]
</IfModule>

# 5G:[USER AGENTS]
<IfModule mod_setenvif.c>
# SetEnvIfNoCase User-Agent ^$ keep_out
SetEnvIfNoCase User-Agent (binlar|casper|cmsworldmap|comodo|diavol|dotbot|feedfinder|flicky|ia_archiver|jakarta|kmccrew|nutch|planetwork|purebot|pycurl|skygrid|sucker|turnit|vikspider|zmeu) keep_out
<limit GET POST PUT>
Order Allow,Deny
Allow from all
Deny from env=keep_out
</limit>
</IfModule>

# 5G:[REQUEST STRINGS]
<IfModule mod_alias.c>
RedirectMatch 403 (https?|ftp|php)\://
RedirectMatch 403 /(https?|ima|ucp)/
RedirectMatch 403 /(Permanent|Better)$
RedirectMatch 403 (\=\\\'|\=\\%27|/\\\'/?|\)\.css\()$
RedirectMatch 403 (\,|\)\+|/\,/|\{0\}|\(/\(|\.\.\.|\+\+\+|\||\\\"\\\")
RedirectMatch 403 \.(cgi|asp|aspx|cfg|dll|exe|jsp|mdb|sql|ini|rar)$
RedirectMatch 403 /(contac|fpw|install|pingserver|register)\.php$
RedirectMatch 403 (base64|crossdomain|localhost|wwwroot|e107\_)
RedirectMatch 403 (eval\(|\_vti\_|\(null\)|echo.*kae|config\.xml)
RedirectMatch 403 \.well\-known/host\-meta
RedirectMatch 403 /function\.array\-rand
RedirectMatch 403 \)\;\$\(this\)\.html\(
RedirectMatch 403 proc/self/environ
RedirectMatch 403 msnbot\.htm\)\.\_
RedirectMatch 403 /ref\.outcontrol
RedirectMatch 403 com\_cropimage
RedirectMatch 403 indonesia\.htm
RedirectMatch 403 \{\$itemURL\}
RedirectMatch 403 function\(\)
RedirectMatch 403 labels\.rdf
RedirectMatch 403 /playing.php
RedirectMatch 403 muieblackcat
</IfModule>

# 5G:[REQUEST METHOD]
<ifModule mod_rewrite.c>
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
</IfModule>
#AIOWPS_FIVE_G_BLACKLIST_END

所以现在我认为403是由其中一条规则触发的。

经过大量的试验,没有好的结果,今天我可以在我的apache服务器错误日志中看到一个日志:[access\u compat:error][pid 4863][client 144.2.2.50:46518]AH01797:客户端被服务器配置拒绝:/public_html/403.shtml,因此我已允许ip 144.2.2.0/24访问我的服务器防火墙。并努力了解为什么apache会给它随机403。