I get an authentication popup from newdomain when the rewrite happens. When I enter credentials, it authenticates them against the server doing the rewrite, not newdomain. The browser just hangs, and in my server error logs it continuously writes "user x not found" until I stop the connection.

1 Answer
1

Which domain is supposed to be doing the authentication? It seems that it should be the new domain, not the old one, given that otherwise one could simply go to the URL with the new domain and access the content without authentication.

In that case, you probably want to rewrite the URL in the user's URL bar, which can be done with the R flag:

There is authentication on both servers which I think may have been the problem. I forgot to add the [P,L] flags, which I was using with the RewriteRule as well. It is working now the way I originally had it. I just changed the htaccess file to point to a different .htpasswd and used Require valid-user instead of Require 'specificUsername'. May have something to do with the new .htpasswd corresponding to one on newdomain...
–
MF86Apr 1 '11 at 22:40