title: Url Manager hide controller name and function name in YII
body: <p>I'm new to the YII framework. I have to hide the default controller name and function name.
  For example: </p>
  
  <p>(Existing URL : <a href="http://localhost/food/store/home" rel="nofollow noreferrer">http://localhost/food/store/home</a> ) </p>
  
  <p>(Required URL : <a href="http://localhost/food/" rel="nofollow noreferrer">http://localhost/food/</a> )</p>
  
  <p>In the YII framework config page, they have declared the <code>urlManager</code> as:</p>
  
  <p><strong>URL Manage in config page :</strong></p>
  
  <pre><code>'urlManager'=&gt;array(
      'urlFormat'=&gt;'path',
      'showScriptName' =&gt; false,
      'rules'=&gt;array(           
          '&lt;controller:\w+&gt;/&lt;id:\d+&gt;'=&gt;'&lt;controller&gt;/view',
          '&lt;controller:\w+&gt;'=&gt;'&lt;controller&gt;/index',
          '&lt;controller:\w+&gt;/&lt;action:\w+&gt;/&lt;id:\d+&gt;'=&gt;'&lt;controller&gt;/&lt;action&gt;',
          '&lt;controller:\w+&gt;/&lt;action:\w+&gt;'=&gt;'&lt;controller&gt;/&lt;action&gt;',
      ),
      'showScriptName'=&gt;false,
  )
  </code></pre>
  
  <p><strong>Default Controller Declaration :</strong></p>
  
  <pre><code>'defaultController'=&gt;'store'
  </code></pre>