Forcing HTTPs redirection

Se desideri reindirizzare automaticamente le connessioni da http a https, aggiungi le seguenti righe all'inizio del file .htaccess presente nella directory principale del dominio.

Senza prefisso www:

RewriteEngine On

RewriteCond %{HTTPS} !=on

RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Con prefisso www:

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{HTTP_HOST} !^www\. [NC]

RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Impostazioni dei cookie

Stato attuale

Mostra dettagli