How to prohibit access to the folder on the site I know: just create a .htaccess file in it with such a content:
Deny From All
And if in the folder we want to protect you can not put any additional files including .htaccess and to protect from direct access at the same time it is necessary – how to be?
or if I have a lot of different folders access to which you need to close, but at the same time I am not convenient to put the .htaccess file in each folder, is it possible to create one .htaccess in which there will be banning instructions Immediately to several listed folders?
Answer 1, Authority 100%
For example:
rewriterule ^ (includes / | lib /) - [f, l, nc]
Disable access to folders includes and lib .
or so:
& lt; files ~ "\ includes" & gt;
Order Allow, Deny
Deny From All.
& lt; / files & gt;
You can simply redirect for folders to make 404 error:
redirect / includes / 404.html