| 
 
 
 | 
| Keep Server Online 
 If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
 
 or
 
 
   
 A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
 
 Thank You! Steffen
 
 Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
 |  | 
 | 
| | 
| | 
|  Topic: Serve directory based on username |  |  
| Author |  |  
| ebarrere 
 
 
 Joined: 10 Feb 2009
 Posts: 2
 
 
 | 
|  Posted: Tue 10 Feb '09 20:01    Post subject: Serve directory based on username |   |  
| 
 |  
| Hi all, thanks in advance for any help! 
 I'm looking for a way to serve a different directory or site based on the username provided during basic authentication (preferably only if the user successfully authenticates)
  I thought there was a way to do this, but my Googling has been fruitless thus far. 
 Thanks to anyone who can point me in the right direction!
 
 
 Cheers,
 
 :: elliott barrere ::
 |  |  
| Back to top |  |  
| acid.-.burn 
 
 
 Joined: 15 Jan 2007
 Posts: 17
 
 
 | 
|  Posted: Thu 12 Feb '09 3:47    Post subject: |   |  
| 
 |  
| is this some what like what you are looking for? 
 
  	  | Code: |  	  | AuthType Basic AuthUserFile /htpasswd/www/.htpasswd
 Require valid-user
 
 Options +FollowSymLinks
 RewriteEngine On
 RewriteBase /
 
 RewriteEngine on
 RewriteCond $1 !^mpg1/
 RewriteCond %{REMOTE_user} ^Jane$
 RewriteRule  ^(.*) secure2/mpg1/$1 [R,L]
 
 RewriteCond $1 !^mpg2/
 RewriteCond %{REMOTE_user} ^Dawn$
 RewriteRule  ^(.*) secure2/mpg2/$1 [R,L]
 
 RewriteCond $1 !^mpg3/
 RewriteCond %{REMOTE_user} ^Ruth\ Smith$
 RewriteRule  ^(.*) secure2/mpg3/$1 [R,L]
 | 
 |  |  
| Back to top |  |  
| ebarrere 
 
 
 Joined: 10 Feb 2009
 Posts: 2
 
 
 | 
|  Posted: Thu 12 Feb '09 9:09    Post subject: |   |  
| 
 |  
| i think that will do splendidly, thanks! |  |  
| Back to top |  |  
 
 | 
 |  | 
 |  |