|
|
|
|
||||||
| alt.apache.configuration Apache web server configuration issues. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello all,
I created two protected dirs in the rootdirectory. Root ---- dir 1 ---- dir 2 What I'd like is this: A user needs to login in in dir 1 so I created the htacces. So far no problem. Next the user clicks it's name in the index.html in dir 1. This link directs to dir 2. (Note: this is not a sub-dir of dir 1) Dir 2 has got also restricted access with htaccess. But the htacces dialog doesn't appear when one accesses via dir1. When I try to connect to root/dir2 directly the htacces dialog does appear. I pointed the AuthUserFile line to the correct directories. Does anyone know how to solve this problem? M. Stemmer |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On May 7, 4:13 am, mstem...@planet.nl wrote:
> Hello all, > I created two protected dirs in the rootdirectory. > Root > ---- dir 1 > ---- dir 2 > > What I'd like is this: > A user needs to login in in dir 1 so I created the htacces. So far no > problem. Next the user clicks it's name in the index.html in dir 1. > This link directs to dir 2. (Note: this is not a sub-dir of dir 1) > Dir 2 has got also restricted access with htaccess. But the htacces > dialog doesn't appear when one accesses via dir1. When I try to > connect to root/dir2 directly the htacces dialog does appear. > I pointed the AuthUserFile line to the correct directories. Does > anyone know how to solve this problem? > > M. Stemmer their credentials are probably cached the first time they enter them.. are they entering the same username/password for each? Flamer. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On May 6, 5:13 pm, mstem...@planet.nl wrote:
> Hello all, > I created two protected dirs in the rootdirectory. > Root > ---- dir 1 > ---- dir 2 > > What I'd like is this: > A user needs to login in in dir 1 so I created the htacces. So far no > problem. Next the user clicks it's name in the index.html in dir 1. > This link directs to dir 2. (Note: this is not a sub-dir of dir 1) > Dir 2 has got also restricted access with htaccess. But the htacces > dialog doesn't appear when one accesses via dir1. When I try to > connect to root/dir2 directly the htacces dialog does appear. > I pointed the AuthUserFile line to the correct directories. Does > anyone know how to solve this problem? > > M. Stemmer firstly have you named the file/s ..htaccess this is what should happen. a) close all browser windows and access http://server.com/dir1 - do you get the login prompt? (yes) b) click to visit http://server.com/dir2 - login prompt (no) c) close all browser windows and access http://server.com/dir2 - do you get the login prompt? (yes) d) type http://server.com/dir1 into address bar, you are allowed a) the .htaccess file needs authentication details, your browser doesnt know them, so you type them in, browser stores them and sends them to server b) .htaccess required auth details, and your browser sends the ones it already which allows access. c) .htaccess requires login to access http://server.com/dir2, however your brwoser has no auth details to send along, so you get asked to type them in, browser stores and sends them d) you type http://server.com/dir2 into address bar, your browser sends the stored auth to server, and you are allowed. This is expected behaviour. However I dont know what you mean by "try to access root/dir2 directly" you need to be much clearer, do you mean when I try to access http://server.com/dir2 directly? If you still are not sure, then simply use two different sets of credentials in yout .htaccess files. You will see that when you use two different sets of credentials (say one .htaccess file ith one user, the other with a different user) that the login box pops up until you type BOTH sets of credentials in and then the boxes stop appearing. Check the docs for "basic authentication" |
|
![]() |
| Outils de la discussion | |
|
|