Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Create a .htaccess file to limit directory browsing

Posted on 2013-11-12
1
Medium Priority
?
230 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 1500 total points
ID: 39643161
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

Looking for the Wi-Fi vendor that's right for you?

We know how difficult it can be to evaluate Wi-Fi vendors, so we created this helpful Wi-Fi Buyer's Guide to help you find the Wi-Fi vendor that's right for your business! Download the guide and get started on our checklist today!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

596 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