title: Yii urlmanager crazy rules
body: <p>goodmorning,</p>
  
  <p>i have yet another problem with my website.
  i've developed a site that is similar to yellowpages.com (well not so similar but is just to have an idea)</p>
  
  <p>now they asked me to make some crazy stuff with SEO and url-rewriting.</p>
  
  <p>i'll start with my main.php</p>
  
  <pre><code>'urlManager'=&gt;array(
          'urlFormat'=&gt;'path',
                      'showScriptName'=&gt;false,
          'rules'=&gt;array( 
                              'surf/category/&lt;id:[0-9]+&gt;/page/&lt;page:[0-9]+&gt;'=&gt;'naviga/categoria/',
                              'surf/subcategory/&lt;id:[0-9]+&gt;/page/&lt;page:[0-9]+&gt;'=&gt;'naviga/sottocategoria/',
                              'surf/page/&lt;page:[0-9]+&gt;'=&gt;'surf/',
                              'contact' =&gt;'site/contact/',
                              'write-mail/&lt;id:[0-9]+&gt;' =&gt;'site/contact/',
                              'privacy' =&gt;'site/page/view/privacy',
                              'register'=&gt;'site/page/view/register',
  
                              '&lt;controller:\w+&gt;/&lt;id:\d+&gt;'=&gt;'&lt;controller&gt;/view',
              '&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;',
  
                          ),
      ),
  </code></pre>
  
  <p>now the request ..... T_T
  they want that the url will be something like that:</p>
  
  <p><a href="http://domain.com/category-name/" rel="nofollow">http://domain.com/category-name/</a> instead of <a href="http://domain.com/surf/category/3" rel="nofollow">http://domain.com/surf/category/3</a> (ex.)</p>
  
  <p><a href="http://domain.com/category-name/sub-category-name/" rel="nofollow">http://domain.com/category-name/sub-category-name/</a> instead of <a href="http://domain.com/surf/subcategory/3" rel="nofollow">http://domain.com/surf/subcategory/3</a></p>
  
  <p><a href="http://domain.com/category-name/sub-category-name/society-name/" rel="nofollow">http://domain.com/category-name/sub-category-name/society-name/</a> instead of <a href="http://domain.com/detail/2" rel="nofollow">http://domain.com/detail/2</a></p>
  
  <p>and obviously the rest of the link must be working with the last 3 controller rules....
  somebody can help me??? i'm in a really tight spot....they'll kick my ass if i can't find a solution for tuesday.....</p>
  
  <p>T_T</p>
  
  <p>thanks in advance for the help.</p>