Create 301 redirect that excludes facebook
snippet in htaccess

Create 301 redirect that excludes facebook

user4033

RewriteEngine On
RewriteCond %{HTTPS} !^on
RewriteCond %{HTTP_USER_AGENT} !(Facebot|facebookexternalhit/1.1) [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]