Reputation: 2344
i have this situation:
folderA/sub/sub/..../file.xml
folderB
folderC
...
.htaccess
index.php
I need deny access to all folderA, subdirectory and files, i put this rule to .htaccess but i can only deny access to folder, not the files inside
RewriteRule ^folderA(/|$) - [L,NC]
Thanks
Upvotes: 0
Views: 118
Reputation: 18671
You can use:
RewriteRule ^folderA(/|$) - [F,NC]
Using the [F] flag causes the server to return a 403 Forbidden status code to the client. While the same behavior can be accomplished using the Deny directive, this allows more flexibility in assigning a Forbidden status.
Upvotes: 1