Cómo forzar el acceso por https en lugar de http

Si quieres obligar a tus visitantes que accedan por https en lugar de http normal, tienes que crear un archivo .htaccess en public_html (o agregar este contenido si ya existe el fichero) con el siguiente contenido:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.tudominio.com/$1 [R,L]

Tienes que cambiar tudominio.com por el tuyo. De este modo aunque alguien acceda sin https a tu web, el servidor web apache hará la redirección forzosa.
  • https, htaccess, ssl
  • 6 Utenti hanno trovato utile questa risposta
Hai trovato utile questa risposta?

Articoli Correlati

Cómo configurar el certificado ssl gratuito Lets Encrypt

Cómo instalar un certificado gratuito de Let’s Encrypt en DirectAdmin Let’s Encrypt ofrece...