simple route help |
[eluser]Ngulo[/eluser]
Hi all guys, i'm trying to keep route works ... now it doesn't works i'm using .htaccess to remove index.php and my simple url is somenthing like this: www.site.com/products/category/2 so i've tryed using this route : $route['products/category/(:num)'] = "asd_controller/asd_function/$1"; but it doesn't works in the way i go to www.site.com/asd_controller/asd_function/1 it shows me a 404 error page not found can someone help me please?
[eluser]Twisted1919[/eluser]
In your case, when you are accessing www.site.com/asd_controller/asd_function/1 it should work without the need of routes, because that's the "un-routed" url so you will reach the asd_controller and the asd_function So, make sure that this works for you, when it does, then you can move on and use the routes to make your url's prettier. Btw, in your case, i don't see why you haven't built a "products" controller, having a "category" method ? It was easier and you wouldn't need routes .
[eluser]Ngulo[/eluser]
hi thanks twisted i really don't understand oyu sorry but it's my problem not your, cause i forgot about explain that i have controller products and method category buti would like to translate them into french language so i would like all www.site.com/products/category/:num urls routed to www.site.com/produits/categories/$1 and how i can do it? thanks again man
[eluser]InsiteFX[/eluser]
I would check into the CodeIgniter Language Class and build or get from the WIKI the French language file. InsiteFX
[eluser]Ngulo[/eluser]
sorry i can't understand you ... what you mean with language file? can i translate url routing? how can i? thnaks
|
Welcome Guest, Not a member yet? Register Sign In |