Apache .htaccess HTTP redirect HTTPS


Para forzar desde un .htaccess para que todos los request http:// redireccionen a https:// es necesario incluir las siguientes lineas

#HTTP 2 HTTPS
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Asegurate que el mod_rewrite este activo dentro del httpd.conf del apache
LoadModule rewrite_module modules/mod_rewrite.so

One thought on “Apache .htaccess HTTP redirect HTTPS

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>