B
B
bankovmarket2016-05-17 13:20:09
Search Engine Optimization
bankovmarket, 2016-05-17 13:20:09

How to switch to https?

Redirects all pages to the main page of something when going

using:
RewriteCond %{HTTP:SSL} !=1 [NC]
RewriteRule ^(.*) https://domain/$1 [L,R=301]

89c638c654b946a094bf97f5452745e8.png

Answer the question

In order to leave comments, you need to log in

4 answer(s)
Z
zooks, 2016-05-17
@zooks

RewriteEngine On
RewriteBase /

RewriteCond %{SERVER_PORT} !^443
RewriteRule (.*) https://example.com/$1 [R=301,L]

A
Alexander Karabanov, 2016-05-17
@karabanov

And if so:

RewriteEngine On
RewriteCond %{SERVER_PORT} ^80$ [OR]
RewriteCond %{HTTP} =on
RewriteRule ^(.*)$ https://www.domain.com/$1 [R=301,L]

X
xmoonlight, 2016-05-17
@xmoonlight

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

A
Alex, 2016-05-17
Pontik @kibal4iw

<IfModule mod_rewrite.c>
        RewriteEngine on	
        RewriteCond %{HTTPS} !on [NC]
        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R]
</IfModule>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question