Forum Moderators: phranque
RewriteCond %{HTTP_HOST} example.com$ [NC]
RewriteRule ^(.*) [example.com...] [R=301,L]
Is there any simpler or better way of doing it?
Thanks.
You must start-anchor the example.com pattern in your RewriteRule to prevent this. Also, I suggest you do *not* end-anchor your pattern, and that you escape your literal periods with "\".
RewriteCond %{HTTP_HOST} [b]^e[/b]xampl[b]e\.c[/b]o[b]m[/b] [NC]