htaccess on shared host

hi , im tryng to run yii2 on shared host. The app is inside /advanced

this is my .htaccess:




<VirtualHost *:80>

    ServerName advanced.local

    #ErrorLog /dev/null

    #LogLevel emerg

    #CustomLog /dev/null combined


    RewriteEngine on

    RewriteBase /


    # the main rewrite rule for the frontend application

    RewriteCond %{REQUEST_URI} !^/(backend/web|admin)

    RewriteRule !^/frontend/web /frontend/web%{REQUEST_URI} [L]

    # redirect to the page without a trailing slash (uncomment if necessary)

    #RewriteCond %{REQUEST_URI} ^/admin/$

    #RewriteRule ^(/admin)/ $1 [L,R=301]

    # disable the trailing slash redirect

    RewriteCond %{REQUEST_URI} ^/admin$

    RewriteRule ^/admin /backend/web/index.php [L]

    # the main rewrite rule for the backend application

    RewriteCond %{REQUEST_URI} ^/admin

    RewriteRule ^/admin(.*) /backend/web$1 [L]


    DocumentRoot /advanced

    <Directory />

        Options FollowSymLinks

        AllowOverride None

        AddDefaultCharset utf-8

    </Directory>

    <Directory /advanced/frontend/web>

        RewriteEngine on

        RewriteBase /


        # 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


        Order Allow,Deny

        Allow from all

    </Directory>

    <Directory /advanced/backend/web/>

        RewriteEngine on

        RewriteBase /


        # 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


        Order Allow,Deny

        Allow from all

    </Directory>

    <FilesMatch \.(htaccess|htpasswd|svn|git)>

        Deny from all

        Satisfy All

    </FilesMatch>

</VirtualHost>






this directive is Recommended by the host :

RewriteBase /

for the .htaccess on root .

But i have a 500 error (

Have you checked the server’s error log?