It's simple to have
http://www.xxx.com have the same content as
http://www.aaa.com/test. However, it sounds to me as though if someone types
http://www.aaa.com/test into their browser's address bar, you want that to be replaced automatically with
http://www.xxx.com...without redirecting them. One way to do that would be to use Apache's mod_rewrite and have a rewrite rule for the directory that
http://www.aaa.com/test points to, and rewrite the request to
http://www.xxx.com. Would that work for you? Otherwise, I have no idea how you would do that if not via a redirect. Even having Apache return a 301 code is a redirect.