title: Custom URL in Yii
body: <p>I want to configure custom URL in Yii . I am stuck at one last step .
  This is how I create the URL : </p>
  
  <pre><code>$a-&gt;url =  Yii::app()-&gt;createUrl('view/profile',array('uid'=&gt;$a-&gt;userid,'type'=&gt;$a-&gt;type,'specialty'=&gt;$specialty,'locality'=&gt;$locality)) ; 
  </code></pre>
  
  <p>This is how I have the rule in config file : </p>
  
  <pre><code>'profile&lt;uid:\w+&gt;_&lt;type:\w+&gt;/'=&gt;'view/profile,
  </code></pre>
  
  <p>This works fine except that the URL which is generated is : </p>
  
  <pre><code>http://localhost/dev/profile122_doctor?specialty=Cardiology&amp;locality=Times+Square
  </code></pre>
  
  <p>I want the URL to be cleaner , something along these lines : </p>
  
  <pre><code>http://localhost/dev/profile122_doctor/specialty-Cardiology-near-Times-Square
  </code></pre>
  
  <p>Can this be done ? Any suggestions ? Btw only uid and type variables are actually required for the URL to work correctly . Rest of the info is needed for the purpose of SEO . </p>