Site icon Learning & Doing

Menghilangkan WWW URL melalui htaccess

Cara Menghilangkan WWW di URL

Tambah kode berikut pada file .htaccess

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]

Exit mobile version