Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to enable pretty url in yii2

'urlManager' => [
    'class' => 'yiiwebUrlManager',
    // Disable index.php
    'showScriptName' => false,
    // Disable r= routes
    'enablePrettyUrl' => true,
    'rules' => array(
            '<controller:w+>/<id:d+>' => '<controller>/view',
            '<controller:w+>/<action:w+>/<id:d+>' => '<controller>/<action>',
            '<controller:w+>/<action:w+>' => '<controller>/<action>',
    ),
],
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #enable #pretty #url
ADD COMMENT
Topic
Name
1+1 =