httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Axel-St├ęphane SMORGRAV <Axel-Stephane.SMORG...@europe.adp.com>
Subject RE: [users@httpd] Per User Directories
Date Mon, 29 Aug 2005 14:25:23 GMT
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: users@httpd.apache.org
Subject: RE: [users@httpd] Per User Directories

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

________________________________

From: Kris [mailto:kris87x@yahoo.co.uk]
Sent: Monday, August 29, 2005 3:56 AM
To: users@httpd.apache.org
Subject: [users@httpd] 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

kris87x@yahoo.co.uk 


---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message