Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    320
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    Pastrana :: Guadalajara :: 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...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #1 speckados, Feb 2, 2013
    Last edited: Feb 2, 2013
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,696
    Likes Received:
    71
    Trophy Points:
    203
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. speckados

    speckados Well-Known Member

    Joined:
    May 21, 2003
    Messages:
    320
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    Pastrana :: Guadalajara :: España
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Not work.

    Browse it's new for this site and already clear cache... try 4 browser....
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice