Remove web/index.php from url


I have build one back end application.which has url like below.


i want to remove "web/index.php" from above url and want url like


i have done some searching for this issue and found below solutions,i have set below code in my config/main.php file.

‘urlManager’ => [

        'enablePrettyUrl' => true,

        'showScriptName' => true,


but it is not working.

any solutions?

Hi magnetodev,

you can found it in the Guide and you must have this in your .httaccess

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^(.*)$ index.php/$1

Thanks that helps…