Justmac
Justmac

Reputation: 550

How to protect directories

I have uploaded different Microsoft Word documents to the directory http://www.mywebsite.com/documents/

Now the problem is that when I browse to this url you can see all my documents in a list but they need to be hidden and only aproachable by a given link (for example http://www.mywebsite.com/documents/document1.doc)

Any idea how I can do this? Is it OK to place a index.html in every documents directory so they get a blank page, or does Google not like this?

Upvotes: 0

Views: 35

Answers (2)

Manigandan Arjunan
Manigandan Arjunan

Reputation: 2265

you can disable directory browsing using .htaccess file if you use apche.

just add the below line into your .htaccess file

Options -Indexes

This will disable the directory browsing in your website.

Upvotes: 0

ʞᴉɯ
ʞᴉɯ

Reputation: 5594

If you are using IIS, make sure you have unchecked the "Allow Directory Browsing" in the directory properties.

If you are using Apache, read this

Apache configuration

Upvotes: 1

Related Questions