Configure Htaccess To Bypass Direct Links To Css And Javascript Files
I am currently developing a mini framework which uses a htaccess doc which redirects all traffic from the public folder to another folder. But Ive realized that it also redirects a
Solution 1:
You cannot route everything to public/
and index.php
at the same time. You probably want this rule in your DocumentRoot/.htaccess
:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^((?!public/).*)$ public/$1 [L,NC]
Post a Comment for "Configure Htaccess To Bypass Direct Links To Css And Javascript Files"