redirection question

asked Mar 4, 2013 in Website Builder by darkshark
Hi

I have installed SSL on my domain. However  by default it is not redirecting to https. How can I  set a redirect for that SSL? can anyone please advice?
thanks

2 Answers

0 like 0 dislike
answered Mar 4, 2013 by TopNet
You can set SSL redirect using .htaccess file. Just add the below code to your .htaccess file
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://yourdomain.com/$1 [R,L]
0 like 0 dislike
answered Mar 4, 2013 by expert
Try to use this code on your server:

RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R=301,L]
...