Pretty / Clean URL in Yii 2

What are the procedure for enabling the pretty urls in yii 2 ?

You can add following code in config under components




				'urlManager' => [ 

						'enablePrettyUrl' => true,

						'showScriptName' => false,

					  

				],