Quantcast
Channel: BulletProof Security Forum » All Posts
Viewing all articles
Browse latest Browse all 12461

Reply To: WordPress SSL htaccess code – Rewrite SSL, RewriteCond %{SERVER_PORT}

$
0
0

[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]
  • This reply was modified 22 hours, 36 minutes ago by Profile photo of Paul Paul.
  • This reply was modified 15 hours, 52 minutes ago by Profile photo of AITpro Admin AITpro Admin.
  • This reply was modified 15 hours, 47 minutes ago by Profile photo of AITpro Admin AITpro Admin.

Viewing all articles
Browse latest Browse all 12461

Trending Articles