yii2 - > URL without index.php

Hi, :)

My website works on Yii 2.0 and Windows server with IIS.

The web root to my website is : …\yii2-app-basic\web

When I click on ‘About’ menu, I arrive this Url :


but I want to delete ‘[color="#8B0000"]index.php[/color]’ on this URL to get a URL like this:


So I change web.php (in \yii2-app-basic\config\) using Pretty Url.

But when I put “showScriptName” on ‘false’ Yii does not find “About” page (Nor the others page (Contact or Login)) :

Here is my code :

'urlManager' => [				

	//'showScriptName' => false,	// Disable index.php

	'showScriptName' => true,	// Avoid 404 [HTTP 404 - File not found] on IIS windows server


	'enablePrettyUrl' => true,	// Disable r= routes


	'enableStrictParsing' => true,

			'rules' => array(

						'<controller:\w+>/<id:\d+>' => '<controller>/view',

						'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',

						'<controller:\w+>/<action:\w+>' => '<controller>/<action>',




How I can delete following word “index.php” in the middle of my URL ? :(


One tip here:


It works, so it is a best solution :D :)

Thanks Tri