I have a private folder that contains all of the private scripts and resources that I use for my website. I’m using .htaccess in the private folder to
deny from all
which works successfully, giving a 403. However, index.php uses javascripts and css from the private folder which means it’s also getting restricted. How do I fix this?
You need to move the JavaScript and CSS files to a public directory so that users can download them so that they can view the web page correctly. If you want, you can disable browsing of the public directory by adding a
.htaccessfile in that directory with the following content: