I’ve this .htaccess file that move all the request to index.php?request=(URI) that elaborates them, except for URI that starts with -file/ that means we are trying to access a public file. Inside the system/root/ there’s only the public index.php file that manage the request so that final users cannot see any system/ file. And application/public/ contains only CSS, images, javascript and public stuff.
-
Is this safe?
RewriteEngine On RewriteRule -file/(.*) application/public/$1 [L] # RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ system/root/index.php?request=$1 [NC,L] -
It works, but does this code has something more that should be deleted or something that miss that should be added?
-
The commented line has any sense now?
It should be
Otherwise, it would match something like
Unless you know that you’ll never use
-filein any of yoursystem/rootrequests.