Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14361 reviews 1715 hosting providers

Questions & Answers

redirection question

Mar 4, 2013 by darkshark

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?

2 Answers

0 votes
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 votes
Mar 4, 2013 by expert
Try to use this code on your server:

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