I am trying to block direct access to certain folders using the code mentioned below on an .htaccess file.
It's works perfectly fine on Xampp (gives a 500 error when trying the access the folders directly), but on Wamp (it gives a 500 error or all pages, even the index page).
In Xampp, I have put the .htaccess file in the htdocs folder and in Wamp I am putting the .htaccess file in www folder.
What am I doing wrong?
RewriteEngine On
# Match directory names and forbid access with the F flag
RewriteRule .*(Images|Videos|Scripts) - [F]