WWW to non WWW
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
I was having the same problem as Vladimir by it redirecting to http://domain.com// with the double slashes. So I did RewriteRule ^(.*)$ http://%1$1 [R=301,L]
6c73ca91-e527-430a-88c1-7c6510180c0a
Created on: 12th October, 2022
Last updated: 12th October, 2022
Tagged With: