I have been trying to get pretty url with the router with Cake.
www.mysite.com/category/slug
www.mysite.com/slug
www.mysite.com/category/
I think there is no formula to get exactly what I want so I want explicitly match each url. I want my route table to look like this
id | url | controller | action | param
So when someone goes to www.mysite.com/mysubcategory/my-title-of-page
I want it to cross reference "mysubcategory/my-title-of-page" with the url column and proceed. What is the best way to do this?
My guess would be to be to direct all traffic to a Route Controller
Router::connect('/*', array('controller' => 'Routes', 'action' => 'redirs'));
But when it redirects i want it to show the pretty url in the browser, i dont want it to show articles/view/12
thank you