Internal server error

After adding in basic template

config/web.php


 'urlManager' => [


            'showScriptName' => false,


            'enablePrettyUrl' => true,

            'rules' => array(

               

            ),

        ],

I have iternal server error when I’m trying to navigate in eache page.

I’m not tried this prettyurl enable I just want to try.I hope someone can help me

Thank you in advance.

In advanced application

Use htaccess in frontend/web




RewriteEngine on

 

# If a directory or a file exists, use it directly

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

# Otherwise forward it to index.php

RewriteRule . index.php

in config




'urlManager' => [

                  'showScriptName' => false, //index.php hide/show:: in false index.php will remove from URL

                  'enablePrettyUrl' => true,

],

I did not use htaccess i use virtualhost, my virtualhost works fine if i will not use pretty url.

set in index.php

defined(‘YII_DEBUG’) || define(‘YII_DEBUG’, true);

and see what error is

PrettyUrl uses pathInfo to specify the route. It is possible that your server configuration is not setup correctly to allow pathInfo to be passed to the application. You really need to find a log entry to tell you the exact error though, otherwise you are guessing.