40 users online (0 members and 40 guests)  


  Results 1 to 3 of 3

Related

  1. Replies: 2
  2. Replies: 1
  3. Protect Source Code    Forum: HTML Forum
    Replies: 5
  1. #1
    osecrown's Avatar
    New User

    Status
    Offline
    Join Date
    Aug 2007
    Posts
    9

    How to Protect My Folder on Server

    How do you make a folder that is
    uploaded on a server not to be accessed
    directly? Example, the folder “Look”
    in a URL contains various files. Now,
    if someone tries to access it through the
    browser this way, MyDomain.com/Look,
    he should receive a message like
    “Files in this folder are not accessible directly”

    I don’t want anybody to access those files
    without opting into a list.

    Thank you for responses and ideas

  2. #2
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: How to Protect My Folder on Server

    Hi there osecrown,

    one simple method is to place an index.html file containing your message in each directory.

    This will ensure that http://www.mydomain.com/look/ will always open the index.html and never show the other contents.

    Of course, there may be more sophisticated methods but I have never bothered to seek them out.

  3. #3
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: How to Protect My Folder on Server

    Aside from coothead's thought, you might also opt on these two:
    • Using htaccess (Options -Indexes):

    • Having htpasswd enabled on your site (via htaccess too):
      http://www.javascriptkit.com/howto/htaccess3.shtml


    Have a good read on htaccess:
    http://www.sitedeveloper.ws/tutorials/htaccess.htm

    Hope it gives you an option.
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.



Tags for this Thread