title: CakePHP Routing: Changing pretty URLs site-wide
body: <p>Let's say I want a page to have a pretty URL:</p>
  
  <p><strong>Config/routes.php</strong></p>
  
  <pre><code>Router::connect('/profile', array('controller' =&gt; 'users', 'action' =&gt; 'profile'));
  </code></pre>
  
  <p>If I want to send visitors to that page, I can use the URL like:</p>
  
  <pre><code>$this-&gt;redirect('/profile');
  
  $this-&gt;Html-&gt;link('Your Profile', '/profile');
  </code></pre>
  
  <p>But let's say I change my mind and I now want the URL to be:</p>
  
  <pre><code>/account
  </code></pre>
  
  <p>How can I change the entire site without changing every instance of <code>/profile</code> to <code>/account</code>?</p>
  
  <p><strong>Alternatively...</strong></p>
  
  <p>Another way to ask my question would be how can I properly code all URLs using Cake array syntax (which I prefer to do rather than hardcode anything):</p>
  
  <pre><code>$this-&gt;redirect(array('controller' =&gt; 'users', 'action' =&gt; 'profile'));
  
  $this-&gt;Html-&gt;link('Your Profile', array('controller' =&gt; 'users', 'action' =&gt; 'profile'));
  </code></pre>
  
  <p>And then ensure that any time that controller/action combination is called, it sends people to the URL:</p>
  
  <pre><code>/profile
  </code></pre>
  
  <p>And have this rule in one place that can be changed. Something like:</p>
  
  <pre><code>Router::connect(array('controller' =&gt; 'users', 'action' =&gt; 'profile'), '/profile');
  
  // Later change to
  
  Router::connect(array('controller' =&gt; 'users', 'action' =&gt; 'profile'), '/account');
  </code></pre>
  
  <p>Is there any way to do that, and also allow further request parameters to be passed along to be added to the URL?</p>