Answer the question
In order to leave comments, you need to log in
How to set priority for opening http files?
There is a file in the folder /public/js/app.min.js
and a rule in the router at the same address, but if you open the link in the browser http://site.com/public/js/app.min.js
, the contents of js
the file open, although it should go through the router :(
The contents of the file/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1
</IfModule>
/public/.htaccess
AddDefaultCharset utf-8
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php
Answer the question
In order to leave comments, you need to log in
Your rewrite does not work, because. the file exists, and in the rewrite conditions it works if the requested file or folder with this name does not exist.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question