Solved

Create a .htaccess file to limit directory browsing

Posted on 2013-11-12
1
216 Views
Last Modified: 2013-11-14
Hello

I need to limit directory browsing on some folders and need to create the .htaccess file to do it. I have been advised to use the line

Options -Indexes

What else do I need to add in the file. Is it just the one line?

I will also be using permissions on the htaccess file of 0444. We just need to limit directory browsing only. Some of the folders we are going to use it on contain images for the website. This was a recommendation as a result of a PCI scan. There was also the suggestion of using a blank index.html file set to 0444. Not sure which is the best option here.
0
Comment
Question by:gregnvt
1 Comment
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
Comment Utility
I would suggest you do both.  Here's the Apache page on Options: http://httpd.apache.org/docs/2.2/mod/core.html#options

Second thought.  Permissions have to be 0644 for the owner to write the files.  If they don't need to be changed, then they could be set to 0444.
0

Featured Post

Superior storage. Superior surveillance.

WD Purple drives are built for 24/7, always-on, high-definition security systems. With support for up to 8 hard drives and 32 cameras, WD Purple drives are optimized for surveillance.

Join & Write a Comment

SHARE your personal details only on a NEED to basis. Take CHARGE and SECURE your IDENTITY. How do I then PROTECT myself and stay in charge of my own Personal details (and) - MY own WAY...
Security measures require Windows be logged in using Standard User login (not Administrator).  Yet, sometimes an application has to be run “As Administrator” from a Standard User login.  This paper describes how to create a shortcut icon to launch a…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now