Re: [users@httpd] Re: Reditect HTTP to HTTPS .htaccess

2018-03-04 Thread D'Arcy Cain
On 03/04/2018 08:07 AM, LuKreme wrote: > I don't do this in .htaccess, I do it in > > >ServerName www.example.com >ServerAlias example.com >Redirect / https://www.example.com/ > > > But something like this should work in .htaccess as well: > > RewriteEngine On > RewriteCond %{S

[users@httpd] Re: Reditect HTTP to HTTPS .htaccess

2018-03-04 Thread LuKreme
I don't do this in .htaccess, I do it in ServerName www.example.com ServerAlias example.com Redirect / https://www.example.com/ But something like this should work in .htaccess as well: RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.com/$1