Question

I would like to use hyphens in my URLs, but since controllers are classes and actions are methods, they of course cannot have hyphens in them. I think for example that about-us looks a lot better in a URL than about_usor aboutus.

Is there a good and clean way to make this happen in Kohana 3.2?

Note: I've seen how you can do this with action parameters, and for that you can just make a route with regex allowing those. But I'm talking about controller and action names here.

Was it helpful?

Solution

You could use a lambda route or overload the Request::controller() and Request::action() methods.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top