Redirect passaggio a https

colomber

Utente Attivo
4 Dic 2012
232
1
18
Salve con questa redirect nel file .htaccess trasferisco da:

h t t p : / / nomesito.com a h t t p s / / nomesito.com ?

RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


se si mi servirebbe passare a h t t p s / / w w w. nomesito.com qualcuno può aiutarmi?

grazie
 
Codice:
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]
 
  • Like
Reactions: grandfather

Discussioni simili