htaccess/htpasswd in hierarchical folder structure
Posted
by chessweb
on Stack Overflow
See other posts from Stack Overflow
or by chessweb
Published on 2010-05-02T09:58:34Z
Indexed on
2010/05/02
10:17 UTC
Read the original article
Hit count: 303
I have a folder (folder_1) that is protected by htaccess/htpasswd files. Inside that folder is another folder (folder_2) that is protected by another couple of htaccess/htpasswd files.
When a php-script in folder_1 or folder_2 is called, the user has to authenticate herself using the correct username and password as specified in the respective htaccess/htpasswd files. This works as intended.
However, as soon as the php-script in folder_2 tries to refer to another script or a css-file that is located in folder_1, the user must enter username and password for folder_1 as well.
Is there a way to avoid this that does not involve copying scripts and css-files from folder_1 to folder_2?
Regards, Ralf
© Stack Overflow or respective owner