Forum Moderators: phranque
I have a Auth Basic authentication on
[mysitename.com...]
and i redirect the user to his specific dir using
%{REMOTE_USER} like
[mysitename.com...]
I wanna use mod rewrite to "chroot" the user to his dir
so he wont be able to go to another dir under
Customers and if he trys to send hime back to his own
cant find the RIGHT condition/rule
can you help?
Welcome to WebmasterWorld!
If REMOTE_USER isn't working the way you'd like, I'd suggest a change in strategy: Put the login code in the user-level directories, define all customers as members of a 'group' and allow members of that group to access the 'Customers' pages, but not each other's directories.
See the discussion of group creation under Basic Authentication at Apache [httpd.apache.org].
Jim
[mysitename.com...]
cannot be able to even know by getting the login window
for
[mysitename.com...]
User = esax
goes to
[mysite.com...]
the Apache redirects him to
[mysite.com...]
there i place .htaccess (in all customers dirs)
which states rewrite conditions
if user=esax trys to go
- [mysite.com...]
the URI is replaced to his own user dir
- [mysite.com...]
but he is allowd to drill down
EX [mysite.com...]
See [webmasterworld.com...] message #2; mod_auth will always run before mod_rewrite on a properly-configured server. mod_rewrite has no way to identify the user until after mod_auth runs, *unless you use cookies*. In order to handle cookies in a flexible and user-friendly way, you'll need some scripting.
Therefore, I stand by my previous answer. Sorry.
Jim
Where is it installed?
Also, what OS and OS version is your server using? I see a potential problem in that only some versions of some *nix OSes support a work-around that allows an indirect 'compare' in mod_rewrite, and a compare may be needed for this application.
Jim