Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
1.4k views
in Q2A Core by
I bought SSL Certificate. How can I redirect HTTP to HTTPS ?
Q2A version: 1.7.4
by
Which answer is best?

2 Answers

+1 vote
by

Using this .htaccess code, you can permanently redirect your website on https://www

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteCond %{SERVER_PORT} 80

RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]

</IfModule>

by
I add this code but gives an error. and not open

domain.com/index.php?qa-rewrite=113/.................
+1 vote
by

In htacces find the <IfModule mod_rewrite.c>

and add this code 

RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

...