I have a multi-level one with drupal, I created a site that first has to be accessible in several ways (subdomains and paths), but now I want to save only one of them; so I would redirect everyone else. Right now I have:
aaa.domain.com/
bbb.domain.com/
domain.com/aaa/
domain.com/bbb/
www.domain.com/aaa/
www.domain.com/bbb/
And I want to redirect all of them to http://www.domain.com/bbb/
I tried to write:
RewriteCond %{HTTP_HOST} ^aaa.domain.com$ [OR]<BR> RewriteCond %{HTTP_HOST} ^bbb.domain.com$ [OR]<BR> RewriteCond %{HTTP_HOST} ^www.domain.com\/aaa$ [OR]<BR> RewriteRule ^/?$ "http\:\/\/www\.domain\.com\/bbb\/" [R=302,L]
I will use 302 and not 301 until it works as expected.
If I log in to aaa.domain.com, it works as expected, but if I log in
http://aaa.domain.com/page/1
he does not work
I read everything I can about htaccess, but something is missing for me.
thanks
source share