Come aggiungere o rimuovere automaticamente www quando si visita un sito.
Inserite il codice nel file .htaccess.
# Aggiungere www
RewriteCond %{HTTP_HOST} ^(?!www\.)(.+) [NC]
RewriteRule ^(.*) http://www.%1/$1 [R=301,NE,L]
# Rimuovere www
RewriteCond %{HTTP_HOST} ^www\.(.+) [NC]
RewriteRule ^(.*) http://%1/$1 [R=301,NE,L]




정말 좋은 정보 감사합니다. 잘 쓰겠습니다