I should also say that the routing bit is useful as a first line of defence against bad slugs.
On Aug 18, 12:46 pm, Taff <[email protected]> wrote: > After reading throughhttp://book.cakephp.org/view/46/Routes-Configuration > along withhttp://c7y.phparch.com/c/entry/1/art,cake-seoand pottering > around for quite some time, I have come to the conclusion that I need > some help. Here is the scenario: > > I am rerouting a controllername to a different name that is SEO > friendlier: > > Router::connect('/consulting/:action/*', array('controller' => > 'consultingskills', 'action' => 'index')); > > This works just fine, and I can now go to site/consulting/view/4 and > it will load the relevant information. > > How would I go about routing to make a URL such as site/consulting/seo > redirect to site/consultingskills/view/4 > > whereby id 4 in the database has a slug called "seo". > > I found a random post with > > Router::connect('/consultingskills/:slug', > array('controller' => 'consultingskills', 'action' => 'view'), > array('slug' => '[-_A-Za-z0-9]+') > ); > > Can anyone walk me through what steps I need to take? > Thanks, > Taff --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
