I have this structure:
/folder/public/
/folder/text.txt
/folder/app/
(etc...)
I want visitors to access to /public/ except everything else.
You can use this rule in site root .htaccess:
RewriteEngine On
# block everything except /folder/public/
RewriteRule !^folder/public/ - [F,NC]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With