Force https:// for q2a site

2 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

About the Author: Toc Xoan

This guy likes taking photos, hunting cheap tours, exploring the unique culture of every cities of Vietnam. Contact: [email protected]