0

I have to redirect a domain from http to https. Here's the old .htaccess file:

RewriteEngine on

RewriteCond %{http_host} !^www.example.com$ [nc]
RewriteRule ^(.*)$ http://www.example.com/$1 [r=301,nc]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
RewriteRule ^index\.html$ http://%{HTTP_HOST}/ [R=301,L]

RewriteRule ^tutorial.html$ /how-to-use.html [R=301]

After installing SSL, how can I change this .htaccess file so that url auto redirect to https? Thanks!

Charles32
  • 9
  • 1
  • Possible duplicate of [How to redirect all HTTP requests to HTTPS](http://stackoverflow.com/questions/4083221/how-to-redirect-all-http-requests-to-https) – gp_sflover Apr 22 '17 at 14:47
  • Not exactly the same. I need an answer to my specific case. – Charles32 Apr 22 '17 at 14:57

0 Answers0