Force https:// for q2a site

114 Likes Comment

Already installed SSL certificated for your website ( let’s encrypt or purchased SSL ). See how to force https:// via .htaccess file configuration.

RewriteEngine On 
RewriteCond %{HTTPS} off 
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

One more step to complete your rule. Go to Question2Answer dashboard, modify the option Preferred site URL: https://yoursite.com . That’s right.

You might like

Avatar

About the Author: Toc Xoan

Leave a Reply

Your email address will not be published. Required fields are marked *