Yii2 advanced htaccess

I tried to add htaccess files to have better access to site, that’s what I used:

Main folder:

AddDefaultCharset utf-8  

<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>

# Mod_Rewrite
<IfModule mod_rewrite.c>
# Enable symlinks
Options +FollowSymlinks
# Enable mod_rewrite
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(.+)/$
RewriteRule ^(.+)/$ /$1 [R=301,L]

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

# Frontend redirect
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteRule ^(.*)$ frontend/web/$1

</IfModule>

And in frontend folder:

AddDefaultCharset UTF-8
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . index.php

But when I try to get to, for example, website.com/site/about, htaccess redirects me to website.com, and all the pages are available with website.com/frontend/web/... URLs, like if I don’t have htaccess files. Why doesn’t it work?