开发者

Kohana, .htaccess and 403 access denied page

开发者 https://www.devze.com 2023-03-20 12:19 出处:网络
How can I disable for viewing list of files inside folder for example media/images开发者_如何学JAVA

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

精彩评论

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