Yii2 Dynamic URL Routing Rules
<p>I want to set <code>Dynamic Routing</code> for url in Cms pages in yii2.
When i add Cms page i will add page alias aboutus,faq,management etc , these alias will saved in db . </p>

<p>When i give URL rule static it will work ,[check code below]</p>

<pre><code>'urlManager' =&gt; [               
            'showScriptName' =&gt; false,  
            'enablePrettyUrl' =&gt; true,  
            //'enableStrictParsing' =&gt; true,
            'rules'=&gt;array(
'aboutus'=&gt;'cms/index/1',
'faq'=&gt;'cms/index/2',
'termacondition'=&gt;'cms/index/3',
'management'=&gt;'cms/index/4',
),
        ], 
</code></pre>

<p>But i want add url rule in dynamically .</p>

<p>I need add all dynamic page alias in config/main.php  URL rule in yii2
Please help me. </p>