1 trae Sep 30, 2014 21:45
3 mgsolipa Oct 01, 2014 08:28
Add www
RewriteCond %{HTTP_HOST} ^example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
Remove www
RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
Repeat that for each one of your domains.
Note: I haven't tested this in a real environment, but it's a very common practice, so it should work with no problem.
4 trae Oct 15, 2014 19:00
Thank you very much. This resolved my issue.
Hi @trae,
Maybe you need to decide how you want your visitors locate those sites. I mean, some experts say that having http://www.example.com/ (A) and http://example.com/ (B) is not a good idea for SEO and usability, so you should take one of them as your main address and redirect the other to this one. i.e. If A is your main address, so people (and search engines robots) accessing through B should be automatically redirected to A.
This could be done using the .htaccess file (http://b2evolution.net/man/htaccess-file). Just open it, locate the line
RewriteEngine On
and paste the following code right after it (according the option you have chosen):... sorry, I will split this comment in two because this forum doesn't allow to share several URLs