Osclass forums
Support forums => Installation / Update help => Topic started by: Chastomber on January 30, 2018, 04:51:14 pm
-
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]
-
edit config.php with https instead of http
-
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
-
Use this htaccess:
<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>
-
#SSL START
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.website.com/$1 [R=301,L]
#SSL END
-
You need to also active SEO ( permalinks ) URL
-
This should be as per the order of lines mentioned below.
<IfModule mod_rewrite.c>
RewriteEngine On
# start ensure https
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# end ensure https
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>