forbid users from browsing web directories


InMotionFans
n/a Points
Asked:
2013-11-20 5:11 pm EST

Hits: 911
Load browser with
mydocalerts.com/
trojaneligibility.com/
trojannationalplans.com/
Notice that these URLs bring up directory-listings.

Is there a directory setting such that web-users cannot browse our directories, e.g., see a list of files and directories?

Thanks, ever!

Mark Wanamaker
Trojan Professional Services

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

Arn
Staff
16,613 Points
2013-11-20 5:42 pm EST
Hello Mark,

Thanks for the question!

There are a number of ways to prevent people from browsing your directories directly from the browser. However, in your case you will want to use the option provided in the tutorial called Using the .htaccess file to change the index page. This is because that one of your sites is using an index page. This site would not be able to use instruction below unless you defined the index page in the .htaccess file as per the article above. If you use the instructions to define an index page (it can be blank) per each site, then the directory will not be browsable.

If you don't want to assign the index page, you can use the following option on the website where you do not define the index page as index.html/htm/php. This is a change that will need to be added in your .htaccess file.

Add this to your .htaccess :

Options -Indexes


If you have any further questions or comments, please let us know.

Regards,
Arnel C.

You must login before you can post a comment about this answer.

Like this Question?

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!