Mr Sooul
Mr Sooul

Reputation: 699

Kohana, .htaccess and 403 access denied page

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

media/images

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...

Upvotes: 0

Views: 530

Answers (1)

Sean
Sean

Reputation: 1286

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

Upvotes: 2

Related Questions