This is a discussion on .htaccess password prompt problem within the Linux Web Servers forums, part of the Web Server and Related Forums category; I have an .htaccess file in a dev folder in the root of a site on a shared host (identifiable ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have an .htaccess file in a dev folder in the root of a site on a
shared host (identifiable info x'd out): order deny,allow deny from all allow from xxx.xx.x.xxx AuthType Basic AuthUserFile /u/e/xxxx/.htpasswd AuthGroupFile /dev/null AuthName EnterPassword require valid-user satisfy any This prompts anyone from outside our office IP for a password to access the dev folder. Unfortunately, as it stands now, it also prompts anyone who wants to access the pub folder for the same password (the pub and dev folders are located on the same level in the server). I had this working before, but lost the original .htaccess file in a migration. What am I doing wrong that this .htaccess is applying its restrictions to other folders on the same level as it? I thought ..htaccess restrictions were only supposed to apply to subfolders. Tx. |
|
|||
|
mehatespam1085@yahoo.com wrote:
> > > This prompts anyone from outside our office IP for a password to access > the dev folder. Unfortunately, as it stands now, it also prompts anyone > who wants to access the pub folder for the same password (the pub and > dev folders are located on the same level in the server). > > I had this working before, but lost the original .htaccess file in a > migration. What am I doing wrong that this .htaccess is applying its > restrictions to other folders on the same level as it? I thought > ..htaccess restrictions were only supposed to apply to subfolders. > > Tx. > A quick search and I found this about .htaccess files: "A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all subdirectories thereof." You need to move your .htaccess file to the directory you want to controll access to. Jim |
|
|||
|
Perhaps I'm being imprecise: I know that subfolders in a folder with an
..htacess file inherit its directives. This is not the case with what I'm talking about: here the folders in question exist on the same level - one isn't inside the other, so: root | __ | | dev pub ....and the .htaccess file in 'dev' is prompting people accessing the 'pub' directory for a password. I don't think this is supposed to happen, and I don't know why. Anybody? Anybody...? Jim Hayter wrote: > mehatespam1085@yahoo.com wrote: > > > > > > > This prompts anyone from outside our office IP for a password to access > > the dev folder. Unfortunately, as it stands now, it also prompts anyone > > who wants to access the pub folder for the same password (the pub and > > dev folders are located on the same level in the server). > > > > I had this working before, but lost the original .htaccess file in a > > migration. What am I doing wrong that this .htaccess is applying its > > restrictions to other folders on the same level as it? I thought > > ..htaccess restrictions were only supposed to apply to subfolders. > > > > Tx. > > > > A quick search and I found this about .htaccess files: "A file, > containing one or more configuration directives, is placed in a > particular document directory, and the directives apply to that > directory, and all subdirectories thereof." > > You need to move your .htaccess file to the directory you want to > controll access to. > > Jim |
|
|||
|
mehatespam1085@yahoo.com wrote:
> Perhaps I'm being imprecise: I know that subfolders in a folder with an > .htacess file inherit its directives. This is not the case with what > I'm talking about: here the folders in question exist on the same level > - one isn't inside the other, so: > > root > | > __ > | | > dev pub > > ...and the .htaccess file in 'dev' is prompting people accessing the > 'pub' directory for a password. I don't think this is supposed to > happen, and I don't know why. > > Anybody? Anybody...? > Just a wild guess, but are there any symbolic links around that could mean that your directory tree actually looks different to that above? DS |
| Thread Tools | |
| Display Modes | |
|
|