Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New Coder
    Join Date
    Feb 2009
    Location
    Philippines
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    htaccess and AllowOverride

    Hi,

    I know that .htaccess won't work when AllowOverride = None, but I'm just having trouble why one directory in my web server can use htaccess. I want to create a login prompt using htaccess and htpasswd.

    sample 1 (this one is working):

    this sample works and propely show and ask for user authentication.

    path : /usr/local/apache/htdocs/mis/folder_1/
    .htaccess
    Code:
    AuthType Basic
    AuthName "Restricted Access"
    AuthUserFile /usr/local/apache/htdocs/mis/folder_1/.htpasswd
    Require user testuser
    sample 2:

    so i created another folder under the mis and named it folder_2, copied the .htaccess and .htpasswd from folder_1 but every time i visit the site it does not show the login prompt.

    any idea why this is happening?

    EDIT:

    ok nvm, i found out by browsing the .conf, the previous user assigned the directory.
    Code:
    <Directory "/usr/local/apache/htdocs/mis/folder_1">
        Options Indexes FollowSymLinks
        AllowOverride AuthConfig
        Order allow,deny
        Allow from all
    </Directory>
    oh well, now its gonna be a problem since if i add my folder i would have to restart the server which most likely will not be allowed
    Last edited by RamaJin; 03-16-2010 at 05:34 AM. Reason: solved


 

Posting Permissions

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