I made my website by yii2 in localhost with xampp, that it works without promblem.
But now after upload my website on linux host I got bellow error:
Forbidden
You don't have permission to access /index.php on this server.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
This is my htaccess content:
RewriteEngine on
# If a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
Why this error occurred ?
If you are using cpanel/WHM, you can change permission through the file manager. If it is still not working for you then delete the index.php and uploaded a new fresh one.
Also, check .htaccess in document root for any error.