Hey Martin,

thanks for the reply. That is currently how I have it working. My
intention is to do away with the view part of the URL to all intensive
purposes so that an call to

controller/slug

actually reroutes to controller/view/slug

The other issue was that I have rerouted my controller from its
original name to something a little more search engine friendly.

controller_from_cake/view/4

to

optimised_category_name/optimised_page_name/

I have no need to visit the frontends controller_from_cakes other
methods (just the view).

Thanks again
Taff

On Aug 18, 1:49 pm, Martin Westin <[email protected]> wrote:
> 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-seoandpottering
> > 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to