Config htaccess problem

Hi
I faced strange problem with yii2 and first of all i should say that its htaccess and yii2 problem not host issue.
when i checked my website on the hosttracker i get “500(InternalServerError)” and when i track this issue to solve my problem i found when i remove htaccess and i add a file with “index.html” in this path: “frontend/web” i get 200 Ok result ?! but in this way my yii project not work ?!


htacces of root :

# prevent directory listings
Options -Indexes
# follow symbolic links
Options FollowSymlinks
RewriteEngine on

RewriteCond %{REQUEST_URI} ^/admin/$
RewriteRule ^(admin)/$ /$1 [R=301,L]
RewriteCond %{REQUEST_URI} ^/admin
RewriteRule ^admin(/.+)?$ /backend/web/$1 [L,PT]

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

htaccess in frontend/web

# use mod_rewrite for pretty URL support
RewriteEngine on
# if a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward the request to index.php
RewriteRule . index.php

please help me
this is my website ulr: https://learnpersian.us

Thanks in advanced

Hi there,

Could you share your vhost config as well? Why do you have a “root” .htaccess ? Where is it placed ?

Hi
I couldn’t access to vhost config
i have htaccess in root because i dont want frontend/web in my url and all backend request redirect to admin
its located in the root project at the public_html folder