Welcome Guest, Not a member yet? Register   Sign In
Clean URLS and the Routes config file
#1

[eluser]Steve Wanless[/eluser]
I have an application where I use the routes config;

Code:
$route[':any'] = "page/view/$1";

to achieve clean (and short) URLs to get something like this

example.com/about-us

instead of

example.com/page/view/about-us

Seeing this is the last line in my routes file, I have to manually enter a re routing line for every controller.
I would prefer to not have to enter something for each controller, otherwise they all get re routed to the pages controller.

Has anyone had this same problem? How did you deal with it?

Is it possible to extend the CI Routes file to go to a specific controller/method instead of the 404 page??

Thanks,


Messages In This Thread
Clean URLS and the Routes config file - by El Forum - 11-05-2010, 01:48 PM
Clean URLS and the Routes config file - by El Forum - 11-09-2010, 07:27 AM
Clean URLS and the Routes config file - by El Forum - 11-09-2010, 08:01 AM
Clean URLS and the Routes config file - by El Forum - 11-09-2010, 11:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB