I'm developing a new site for a client. We've got Domain A running the old site and Domain B running the new site. Office emails use Domain B (and therefore people may type Domain B into their browser). I'd like to use .htpasswd etc to lock down the contents of Domain B but for those who fail - I want them redirected to Domain A. How do I do this?
Got a good enough solution. Added this ErrorDocument 401 "<html><head><meta http-equiv='refresh' content='0;url=http://www.domain-a.com/'></head><body><h2>Authorization Required</h2><h1>Redirecting you to http://www.domain-a.com/</h1></html> Code (markup):