title: joomla mvc component redirect with friendly url
body: <p>I got a code like this in my controller</p>
  
  <pre><code>class MyController extends MyBaseController {
  
   function redirectToCart() {
      $link = JRoute::_('index.php?option=com_foo&amp;view=cart');
      $this-&gt;setRedirect($link);
    }
  
  }
  </code></pre>
  
  <p>I also created a menu associated with my view cart in menu name "View Cart" every time i click this button the url is <code>domainname.com/view-cart</code> but when use redirect in mvc the url is <code>domainname.com/index.php?option=com_foo&amp;view=cart</code></p>
  
  <p>How can i create a redirect in mvc that it work with the front-end link or at least create a user friendly url</p>