Facebook Crawler
-
Hi,
Great plugin! Using the particular site and server configuration I was faced with, this was the only one that worked as a drop-in replacement, without needing to pay a third party service.
Just wanted to say that, using the default configuration of “silently” rerouting requests to images to webp equivalents without changing their file extension confuses the Facebook crawler, because it unfortunately checks the filename extension instead of the response’s Content-Type header.
If using Apache 2.4.8 or later, this can be fixed by adding an .htaccess file in /wp-content containing
<IfModule mod_rewrite.c> RewriteEngine On RewriteOptions InheritDownBefore RewriteCond %{HTTP_USER_AGENT} (facebookexternalhit/[0-9]|Chrome|Facebot|Twitterbot|Pinterest|Google.*snippet) RewriteRule ^ - [END] </IfModule>
…to still serve the original image to social crawlers, but otherwise, and this is what I wanted to ask about, the following can be included among the rewrite conditions in /uploads/.htaccess:
RewriteCond %{HTTP_USER_AGENT} !(facebookexternalhit/[0-9]|Facebot|Twitterbot|Pinterest|Google.*snippet)
Could this be made a default inclusion, or at least an option within the plugin?
- The topic ‘Facebook Crawler’ is closed to new replies.