logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Serve directory based on username
Author
ebarrere



Joined: 10 Feb 2009
Posts: 2

PostPosted: Tue 10 Feb '09 20:01    Post subject: Serve directory based on username Reply with quote

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) Smile 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

PostPosted: Thu 12 Feb '09 3:47    Post subject: Reply with quote

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

PostPosted: Thu 12 Feb '09 9:09    Post subject: Reply with quote

i think that will do splendidly, thanks!
Back to top


Reply to topic   Topic: Serve directory based on username View previous topic :: View next topic
Post new topic   Forum Index -> Apache