Is it possible to write an htpasswd file that redirects certain users to certain directories?

Posted by racl101 on Server Fault See other posts from Server Fault or by racl101
Published on 2010-05-03T20:09:13Z Indexed on 2010/05/03 20:18 UTC
Read the original article Hit count: 307

Filed under:
|
|
|

Hi there,

Assuming that I have a domain, say, mydomain.com and three directories under it call them dir1, dir2 and dir3, then is it possible to put an htpasswd file at the web root and have it redirect authenticated users to their respective directories (e.g. user joecorleone101 always get redirected to dir3 upon being authenticated.)?

First of all I want to know if this is possible and second is it safe or practical (or impractical)? Am I thinking about it the wrong way? Should I maybe use an htaccess file?

© Server Fault or respective owner

Related posts about apache

Related posts about redirection