开发者

Kohana, .htaccess and 403 access denied page

How can I disable for viewing list of files inside folder for example

media/images开发者_如何学JAVA

using .htaccess?

Of course, simple file with proper path

media/images/icons.png

should be available (all in all website need to use these files).

I have seen a lot of pages using such a thing.

I'm using Kohana v3, so I can alternatively use routes and controllers but it's not efficient method...


You can do this with the Options directive by turning off Indexes, e.g.

<Directory /media/images>
    Options -Indexes
</Directory>

There's more information available here:

http://httpd.apache.org/docs/1.3/misc/FAQ.html#indexes

Thanks, Sean

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜