Web Servers on Unix and Linux - .htaccess password prompt problem

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Unix and Linux > November 2006 > .htaccess password prompt problem





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author .htaccess password prompt problem
mehatespam1085@yahoo.com

2006-11-21, 7:19 pm

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

2006-11-23, 7:16 pm

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:
>
>
> 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


David Squire

2006-11-24, 7:20 am

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
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com