Reputation: 1065
I do have an centos/apache server, with this htaccess file. When I visit the site via www.example.com I'm correctly redirected to testsite.com, when I go to example.com it seems like the server read the htaccess from another server (the old one of the domain, I think, but I don't have access to it). Here's the htaccess:
RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_HOST} !^myip
RewriteRule .* http://www.testsite.it [R=302,L]
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
Upvotes: 0
Views: 41
Reputation: 159
The simplest way it's set alias in your domain zone configuration that redirect www.example.com
to example.com
. It should be there but for some reason its not, I gues. Check it anyway.
Upvotes: 1