Add / Remove www when accessing site

Add / Remove www when accessing site

If you access the site, you can add or remove the www automatically.

You can type it in your .htaccess file.

# www 추가하기

RewriteCond %{HTTP_HOST} ^(?!www\.)(.+) [NC]
RewriteRule ^(.*) http://www.%1/$1 [R=301,NE,L]
# www 제거하기

RewriteCond %{HTTP_HOST} ^www\.(.+) [NC]
RewriteRule ^(.*) http://%1/$1 [R=301,NE,L]