[Topic has been merged into this relevant Topic]
I am currently using the following to send index.htm to the root .co.uk
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^mysite\.co\.uk$ [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} [R,L]
RewriteRule ^index\.htm$ / [R,L]
I am going to move to ssl and was wondering what i needed to add to this and also what i would need to redirect all pages from http to https?
In above would i just add an s to any http like
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPs_HOST} ^mysite\.co\.uk$ [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R,L]
RewriteRule ^index\.htm$ / [R,L]
Would this do the http to https bit on a like for like
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/%$1 [R,L]