I'd like to deny access if the REMOTE_USER does not match SUBDOMAIN.example.com. The site is protected by
Require valid-user (as usual). Currently anybody can access all areas so long as she's logged in.
The intended behavior is this:
- alice can access alice.example.com and nothing else
- bob can access bob.example.com and nothing else
- bonus points for granting all-access to admin
Sound too easy? Here's the catch: Subdomains/usernames are dynamic, so any hard-coded "alice" or "bob" strings do not count!
Is there any way I can do that with Apache?