ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

password protect directory

September 21, 2011 12:47pm

Subscribe [3]
  • #1 / Sep 21, 2011 12:47pm

    brianhl

    1 posts

    I have a section that I have password protected using EE script and that works fine. I have pdf files within that section and if a user visits the URL of the pdf file, it is no longer password protected, as it is in an upload directory.
    How do I password protect an upload directory? I have used cPanel and entered the directives manually without success. I can tell it is partly working as I am returned to the default homepage when the Authenication language is in place, so I can’t access the pdf files, but I do not get a dialog box that allows me to enter password info.

    My .htaccess files looks like:
    AuthType Basic
    AuthName “secure”
    AuthUserFile “/home/mysite/.htpasswds/public_html/mydir/passwd”
    require valid-user

    The passwd file is in the proper location, as is the directory I’m trying to protect.
    Thanks for any help!

  • #2 / Sep 21, 2011 1:42pm

    lebisol

    2234 posts

    http://tools.dynamicdrive.com/password/
    it is your location of file and if above ‘public_html’ folder there is really no need to add a dot into folders name. By the fact that folder is above public or ‘root’ folder it will not be accessible by visitors.

  • #3 / Sep 22, 2011 2:29am

    John Henry Donovan

    12339 posts

    Hi brianhl,

    Does the generator lebisol linked to help?

    EE protects a dynamic folder/template_group not individual files. I am going to move this thread to the Community Help forum as more appropriate there. And will allow you to continue discussion

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases