How to fix 403 error at main page in Yii2 advanced?

After installing Yii2 advanced and uploading it to hosting I got 403 error at main page. But admin panel is working normally and also /about, /contact and other pages. And if I create index.php at root folder it’s openning too. What could cause that error? .htaccess?

Root .htaccess:

<IfModule mod_autoindex.c>

  Options -Indexes
</IfModule>


<IfModule mod_rewrite.c>
  Options +FollowSymlinks

  RewriteEngine On
  IndexIgnore */*

  RewriteRule ^adminpanel/(.*)?$ /backend/web/$1 [L,PT]

  RewriteRule ^([^/].*)?$ /frontend/web/$1
</IfModule>

.htaccess at frontend/web and backend/web are equal:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php

Have you checked the permissions in the frontend/web/index.php?

How do you open the index.php in the root folder? The php runs when you open it?

Hello everyone,

I used Yii2 framework with advanced template. when i run my project on lampp, everything is fine, but when i copied and test on my host, backend of my project it get 403 http error. everythong looks fine and my files perimission is 0757, where did I go wrong?

This is my htaccess file:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php