Or, since you already know about the userdir module, maybe if the REMOTE_USER 
environment variable is defined, and the user requests the root (/) the request 
can be redirected to that user's home:

RewriteEngine On
RewriteCond %{REMOTE_USER} !=""
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^/$ /%{REMOTE_USER}/ [R,L]

or, if the REMOTE_USER is non-empty (defined), and the first element of the URL 
path is not the REMOTE_USER, then path is prefixed with the username and a 
redirect is returned:

RewriteEngine On
RewriteCond %{REMOTE_USER} !=""
RewriteCond %{REMOTE_USER} !=$1 
RewriteRule ^/([^/]*)(.*) /%{REMOTE_USER}$2 [R,L]

The sky is the limit. You just need to know exactly what you want.

-ascs

-----Original Message-----
From: Axel-Stéphane SMORGRAV 
Sent: Monday, August 29, 2005 2:19 PM
To: [email protected]
Subject: RE: [EMAIL PROTECTED] Per User Directories

What about redirecting them to http://my.domain/~username/ (requires 
mod_userdir) ??
 
-ascs

________________________________

From: Kris [mailto:[EMAIL PROTECTED]
Sent: Monday, August 29, 2005 3:56 AM
To: [email protected]
Subject: [EMAIL PROTECTED] Per User Directories



Can anyone tell me if there is a way that I can make http://my.domain/username/ 
forward the user to a directory based on the username which they logged in 
with. e.g. if they log into my site (using htaccess) with the username 'guest', 
is there a way to create a link which will forward them to 
http://my.domain/guest/ . I know how to use the userdir module but I would like 
to create a general link with the username variable included. Is there a way to 
substitute the username into the link?

Or is there a way around this?  

Many Thanks

[EMAIL PROTECTED] 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to