开发者

How to protect directories

I have uploaded different Microsoft Word documents to the directory ht开发者_如何学Ctp://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?


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜