Forum Moderators: phranque

Message Too Old, No Replies

.htaccess redirect HELP

.htaccess redirect user

         

81mustang

11:13 pm on Feb 26, 2008 (gmt 0)

10+ Year Member



Hey guys im very new to the .htaccess world....I have a basic .htaccess file that just requires a correct username and password to access a private area....now I have the need for multiple users....I am wanting a user to be redirected depending on their login name...user1 to user1.htm...user2 to user2.htm please help! I have read all other documents and can not find help. Here is a copy of my .htaccess file

AuthName "test.com"
AuthType Basic
AuthUserFile "/services/webpages/l/o/test.com/public/private/.htpasswd"
<Limit GET POST PUT>
require valid-user
# Order deny,allow
# Deny from all
# Allow from all
</Limit>

jdMorgan

3:50 pm on Feb 27, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can try using mod_rewrite's RewriteCond to back-reference the %{REMOTE_USER} variable. But I'm not sure that will work from any page except the login page.

See the documents cited in our forum charter [webmasterworld.com] to get started.

Jim