Hi all, We have a customer here, with a shedload of subsites on [whatever].domain1.com. They now have a newer/different/shorter domain which they prefer to use: domain2. Is there an easy way to have Apache send all requests that come in on [whatever1].domain1.com/[whatever2] to [whatever1].domain2.com/[whatever2] with either a 301 or a 302 (hasn't been decided yet). greetings, Evert
Give this one a shot, Evert: RewriteEngine on RewriteCond %{HTTP_HOST} ^whatever1.domain.com$ RewriteRule ^(.*)$ http://whatever1.domain2.com$1 [R=301,L] Code (markup):
Will that redirect to http://[whatever1].domain2.com/? or to http://whatever1.domain2.com/ ? (it should go to http://[whatever1].domain2.com/ ) greetings, Evert
This will redirect (for example): http://whatever1.domain.com/mypage.html to http://whatever1.domain2.com/mypage.html with a 301 redirect.