Solved

Create a .htaccess file to limit directory browsing

Posted on 2013-11-12
1
220 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 83

Accepted Solution

by:
Dave Baldwin earned 500 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access_log 17 121
how to rebuild XFS volume from LV 19 64
is this a virus? 3 40
000webhost.com default error log 1 28
Users of Windows 10 Professional can disable automatic reboots using the policy editor. This tool is not included in the Windows home edition. But don't worry! Follow the instructions below to install (a Win7) policy editor on your Windows 10 Home e…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

770 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