.htaccess password prompt problem

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


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-21-2006
mehatespam1085@yahoo.com
 
Posts: n/a
Default .htaccess password prompt problem

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.

  #2 (permalink)  
Old 11-22-2006
Jim Hayter
 
Posts: n/a
Default Re: .htaccess password prompt problem

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
  #3 (permalink)  
Old 11-23-2006
mehatespam1085@yahoo.com
 
Posts: n/a
Default Re: .htaccess password prompt problem

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


  #4 (permalink)  
Old 11-24-2006
David Squire
 
Posts: n/a
Default Re: .htaccess password prompt problem

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:48 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0