Support forums > Installation / Update help

HTTP to HTTPS how to do?

(1/2) > >>

Chastomber:
Hello,
I need to redirect Http to Https... If I change .htacess with the code below, can I?

# Redirecionar para HTTPS WC
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

marius-ciclistu:
edit config.php with https instead of http

Chastomber:

Thanks ... it works, but now it looks like I have 2 sites.
If I type www.encontreaqui.online - https does not show ... I need to write https.incontact.online ... I would like to redirect automatically ... I need to use .htaccess OR can I make a code in config.php to redirect

tito:
Use this htaccess:


--- Code: ---<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
--- End code ---

Aficionado:

--- Code: ---#SSL START

RewriteEngine On

RewriteCond %{SERVER_PORT} 80

RewriteRule ^(.*)$ https://www.website.com/$1 [R=301,L]

#SSL END

--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version