通过屏蔽它来重定向URL通过htaccess

I have two domains, www.domainA.com and www.domainB.com. I have actual files in domainA.com/files. When a user go to www.domainB.com, he should redirect to www.domainA.com/files. but in address bar it should show www.domainB.com.

I do not know how to do it. Somebody please suggest me how to achieve this.

* EDITED *

I have downloaded proxy script from http://sourceforge.net/projects/phpr0xi/ and did the same think in .htaccess, but it gives me below error. 404 Not Found The server can not find the requested page:

my .htaccess in www.domainB.com.

RewriteEngine on
RewriteRule ^domainb(.*) http://www.domainA.com/domainb$1 [P]

You can try this htaccess redirect, it should generate this code for you for a 302 redirect.

#302 Redirect Entire Old directories
RedirectMatch 302 domainb(.*) http://www.domainA.com/domainb$1

since you want to keep the old domain on the address bar, the 302 redirect code will do the trick