I'm using htaccess
to access the css
, js
, images
folders that are in /public
directly:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^(css|js|images)/(.*)$ public/$1/$2 [QSA,L]
</IfModule>
For example, when access is url http://localhost/css/file.css
it shows the contents of http://localhost/public/css/file.css
But I want to deny access if the user types "public" in the address, for example http://localhost/public/css/file.css
. Is it possible to deny access to /public
in the address?