The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Protect directory (htaccess) don't work properly

Discussion in 'Security' started by speckados, Feb 2, 2013.

  1. speckados

    speckados Well-Known Member

    Joined:
    May 21, 2003
    Messages:
    291
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Acequias :: Granada :: España
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Hi

    My customer protect directory with cpanel.

    Cpanel create usually .htaccess

    Code:
    AuthType Basic
    AuthName "PROFESIONAL"
    AuthUserFile "/home2/XXXXXX/.htpasswds/public_html/pdf/pros/passwd"
    require valid-user
    
    And /home2/XXXXXX/.htpasswds/public_html/pdf/pros/passwd

    PROBLEM:

    on browser

    domain/pdf/pros/ --->> Protected with user & password
    domain/pdf/pros/anyfile.html --> NO PROTECTED (Browser don't ask for user & password)

    Also try with

    Code:
    <FilesMatch "\.(htm|html|pdf)$">
    AuthType Basic
    AuthName "PROFESIONAL"
    AuthUserFile "/home2/XXXXX/.htpasswds/public_html/pdf/pros/passwd"
    require valid-user
    </FilesMatch>
    
    Dont' work...
     
    #1 speckados, Feb 2, 2013
    Last edited: Feb 2, 2013
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    works on any of our servers (your all ready authenticated)
    close your browser and or clear cache reopen or use a different browser
     
  3. speckados

    speckados Well-Known Member

    Joined:
    May 21, 2003
    Messages:
    291
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Acequias :: Granada :: España
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Not work.

    Browse it's new for this site and already clear cache... try 4 browser....
     
Loading...

Share This Page