Password protect a folder not a page

Discussion in 'HTML' started by ©®, Jan 24, 2006.

  1. ©®

    ©® Guest

    I know you can password protect a webpage but is it possible to protect
    a folder on a website e.g. /www/myown/ that only has other files in it
    and not any html files?
    Am thinking of storing a few personal files I may need access to when
    travelling and may not always have a USB memory key or other media
    available.
    Any help/tips/suggestions appreciated.

    Can use PHP on the server if that means anything.
    ©®, Jan 24, 2006
    #1
    1. Advertising

  2. ©® wrote:

    > I know you can password protect a webpage but is it possible to protect
    > a folder on a website e.g. /www/myown/ that only has other files in it
    > and not any html files?


    HTTP makes no distinction between HTML documents and other resources (well,
    aside from when it tells the client what type of data it is sending). You
    password protect any resource in the same way.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Jan 24, 2006
    #2
    1. Advertising

  3. ©®

    ©® Guest

    David Dorward wrote:
    > HTTP makes no distinction between HTML documents and other resources
    > (well, aside from when it tells the client what type of data it is
    > sending). You password protect any resource in the same way.


    Thanks for the input. As I am a newbie, is there a tutorial where I can
    learn about how to do it?
    Thanks
    ©®, Jan 24, 2006
    #3
  4. ©® wrote:
    > Thanks for the input. As I am a newbie, is there a tutorial where I can
    > learn about how to do it?


    Most web servers have password protection built in. The specifics depend on
    the server. The manual is your friend.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Jan 24, 2006
    #4
  5. On Tue, 24 Jan 2006, ©® wrote:

    > Thanks for the input. As I am a newbie, is there a tutorial where I can
    > learn about how to do it?


    If you're using an apache-based server, as most people are, you would
    do well to familiarise yourself with what documentation it offers.
    It's very good, and definitely more accurate than many poorly-
    researched attempts to pre-digest it for those who are too nervous to
    look at the real thing.

    Depending on which httpd version you use, take a look at

    http://httpd.apache.org/docs/1.3/
    http://httpd.apache.org/docs/2.0/

    The link to the tutorial on "Authentication, Authorization, and Access
    Control" would be hard to miss.
    Alan J. Flavell, Jan 24, 2006
    #5
  6. ©® wrote:
    > I know you can password protect a webpage but is it possible to protect
    > a folder on a website e.g. /www/myown/ that only has other files in it
    > and not any html files?
    > Am thinking of storing a few personal files I may need access to when
    > travelling and may not always have a USB memory key or other media
    > available.
    > Any help/tips/suggestions appreciated.
    >
    > Can use PHP on the server if that means anything.


    Hello,

    Protect the folder with .htaccess and open the file for each user while
    php file functions.

    check the download function on this page:
    http://www.finalwebsites.com/snippets.php?id=10

    regards Olaf
    finalwebsites.com, Jan 25, 2006
    #6
  7. ©®

    ©® Guest

    > If you're using an apache-based server, as most people are, you would
    > do well to familiarise yourself with what documentation it offers.


    My provider is using Apache but I have no input/control over what he has
    set things up with. So...as a user, is there anything I can do to stop
    access to a certain directory unless the password is known?
    ©®, Feb 3, 2006
    #7
  8. ©®

    Steven Guest

    On Fri, 3 Feb 2006 00:52:14 -0000, "©®" <> wrote:

    >> If you're using an apache-based server, as most people are, you would
    >> do well to familiarise yourself with what documentation it offers.

    >
    >My provider is using Apache but I have no input/control over what he has
    >set things up with. So...as a user, is there anything I can do to stop
    >access to a certain directory unless the password is known?


    Apache checks for a file called '.htaccess' in each folder (this check
    can be disabled but probably isn't) and this file can specify things
    like passwords for access. So, check the documentation, create the
    file, and upload it to the required folder. The Apache documentation is
    good but I have never protected a folder so I can't really offer any
    more info.

    -- Steven
    Steven, Feb 3, 2006
    #8
  9. ©®

    kchayka Guest

    Steven wrote:
    >
    > The Apache documentation is
    > good but I have never protected a folder so I can't really offer any
    > more info.


    The Control Panel of your hosting service account may list an option to
    password-protect a directory, among other things. I know CPanel usually
    has one.

    --
    Reply email address is a bottomless spam bucket.
    Please reply to the group so everyone can share.
    kchayka, Feb 3, 2006
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Narlen
    Replies:
    4
    Views:
    549
    Jemdam.com
    Nov 1, 2005
  2. Narlen
    Replies:
    9
    Views:
    422
    brucie
    Nov 4, 2005
  3. AAaron123
    Replies:
    2
    Views:
    2,104
    AAaron123
    Jan 16, 2009
  4. AAaron123
    Replies:
    1
    Views:
    1,320
    Oriane
    Jan 16, 2009
  5. Narlen

    How can I password protect a page?

    Narlen, Nov 5, 2005, in forum: Javascript
    Replies:
    3
    Views:
    101
Loading...

Share This Page