Results 1 to 4 of 4

Thread: .htaccess in sub directory blocking whole domain

  1. #1

    Thread Starter
    PowerPoster Arc's Avatar
    Join Date
    Sep 2000
    Location
    Under my rock
    Posts
    2,336

    .htaccess in sub directory blocking whole domain

    Hey guys, I am not sure where to post this since it ins't PHP related, but hopefully someone can help me.

    I uploaded an htaccess file to a directory on my server to block access to that particular directory. However, when I would try to go to any other directory ( Ones above that direcotry) it would block those as well.

    For instance, here is the tree structure

    httpdocs
    ------------directory1
    ------------directory2 <----- htaccess is in this directory
    ------------directory3
    ------------directory4
    ------------directory5
    ------------Lots of other files.....

    I can't go into any directory on the server without entering the password info. Why is that? I thought it was only supposed to protect that one directory.

    Thanks.
    -We have enough youth. How about a fountain of "Smart"?
    -If you can read this, thank a teacher....and since it's in English, thank a soldier.


  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: .htaccess in sub directory blocking whole domain

    It would help if you could post the contents of the access file.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3

    Thread Starter
    PowerPoster Arc's Avatar
    Join Date
    Sep 2000
    Location
    Under my rock
    Posts
    2,336

    Re: .htaccess in sub directory blocking whole domain

    The contents look like this

    AuthName "Section Name"
    AuthType Basic
    AuthUserFile /full/path/to/.htpasswd
    Require valid-user

    the .htpasswd file is also in the same directory

    thanks
    -We have enough youth. How about a fountain of "Smart"?
    -If you can read this, thank a teacher....and since it's in English, thank a soldier.


  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: .htaccess in sub directory blocking whole domain

    That looks ok to me. Make sure your htaccess has not accidentaly been copied into the parent directory. It may also be worth restarting the browser.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width