title: CakePHP route redirect with parameters
body: <p>I need to keep SEO links active so I'm trying to 301 redirect google trafic to new CakePHP route.</p>
  
  <p>I go to:</p>
  
  <pre class="lang-none prettyprint-override"><code>http://localhost/jakne/someCategory/item-slug
  </code></pre>
  
  <p>And I want it to 301 redirect to:</p>
  
  <pre class="lang-none prettyprint-override"><code>http://localhost/product/item-slug
  </code></pre>
  
  <p>So I tried with <code>route::redirect</code> but I can't make it work. Doc on this is also non existent :(</p>
  
  <pre class="lang-php prettyprint-override"><code>$routes-&gt;redirect(
      '/jakne/:subcategory/:item',
      ['controller' =&gt; 'Catalog', 'action' =&gt; 'product'],
      ['status' =&gt; 301, 'pass' =&gt; ['item']]
  );
  </code></pre>
  
  <p>My <code>Catalog::product</code> looks like:</p>
  
  <pre class="lang-php prettyprint-override"><code>public function product($productId) {
  }
  </code></pre>
  
  <p>I always get error that no parameter was passed to the action.
  What am I missing? :(</p>