Hello,
I have all my files that I want clients to have access to in one
folder named assets. I want to forbid direct access to any other
folders and their files.

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule \.(?!assets.+)$ index.php?path=error404

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?path=$1

This does not work for some reason. I mean although it allows access
to any files and folders within assets but it blocks access to non
existing folders. For instance when I type in domain.com/home or
domain.com/contact-us or anything else that isn't a folder it treats
it as a folder ( or file :| ) and redirects me to
index.php?path=error404 instead of executing second set of rules. Why
is that and how to fix it?

Regards

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to