PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > alt.apache.configuration > Link within protected dir to other protect dir htaccess?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
alt.apache.configuration Apache web server configuration issues.

Link within protected dir to other protect dir htaccess?

Réponse
 
LinkBack Outils de la discussion
Vieux 06/05/2007, 17h13   #1
mstemmer@planet.nl
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Link within protected dir to other protect dir htaccess?

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

  Réponse avec citation
Vieux 07/05/2007, 00h19   #2
flamer die.spam@hotmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Link within protected dir to other protect dir htaccess?

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.

  Réponse avec citation
Vieux 07/05/2007, 00h28   #3
shimmyshack
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Link within protected dir to other protect dir htaccess?

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"

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 15h27.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11989 seconds with 11 queries