How to configure .Yii2 htaccess in that specific folder not fall under the rules?

Hello.There is a problem with .htaccess.

In the root directory there is a directory called "dtf". And the problem is when I turn on the following path site.name/dtf/ymi - I displays the main page of the site(the frontend/web/site/index.

Content .htaccess:
RewriteEngine On

RewriteCond %{REQUEST_URI} !^/(backend/web|admin)
RewriteRule !^frontend/web /frontend/web%{REQUEST_URI} [L]

RewriteCond %{REQUEST_URI} ^/admin
RewriteRule ^admin(.*) /backend/web/$1 [L]

RewriteCond %{REQUEST_URI} ^/frontend/web
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /frontend/web/index.php [L]

RewriteCond %{REQUEST_URI} ^/backend/web
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /backend/web/index.php [L]


How to solve the problem of this kind? Thank you.
June 14th 19 at 20:26
1 answer
June 14th 19 at 20:28
Solution
Add the 3rd line RewriteCond %{REQUEST_URI} !^/(dtf):
RewriteCond %{REQUEST_URI} !^/(backend/web|admin)
RewriteCond %{REQUEST_URI} !^/(dtf)
RewriteRule !^frontend/web /frontend/web%{REQUEST_URI} [L]

Find more questions by tags htaccessYii