Redirigir un dominio no www a www y http a https mediante .htaccess
1. Redirigir dominio.tld a www.dominio.tld
RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule .* http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
2. Redirigir http a https
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
3. Redirigir dominio.tld a www.dominio.tld y http a https
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} !^www\. RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Comments