We have two domains, http://www.aaa.com and http://www.bbb.com. Both point to the same root directory on the server.
The server has two sub-directories in the root: /abc/ and /xyz/.
If someone types in http://www.aaa.com/abc/ They should go to /abc/ (like normal)
If someone types in http://www.aaa.com/xyz/ They should go to /xyz/ (like normal)
** If someone types in http://www.bbb.com/abc/ They should go to /xyz/ (using the rewrite)
If someone types in http://www.bbb.com/xyz/ They should go to /xyz/ (like normal)
How do we write that rewrite for the third case above, where it only affects domain http://www.bbb.com and not http://www.aaa.com?
You need to use condition and a rule: