I am trying to block access to a specific folder and all of its content. I use methods suggested on the Internet, but they do not work.
This method does nothing:
RewriteRule ^folder_name/?$ - [F,L]
ErrorDocument 403 default
And this one brings internal server error:
<Directory "/folder_name/">
deny from all
</Directory>
What is wrong here?
My htaccess file looks like this:
RewriteEngine on
Options -Indexes
DirectoryIndex index.html
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,L]
#rewrite rules for base URLs
RewriteRule ^([^/\.]+)[/]*$ $1\.html [QSA,L]