Welcome Guest, Not a member yet? Register   Sign In
simple route help
#1

[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 Sad

can someone help me please? Smile
#2

[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 .
#3

[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? Sad

thanks again man
#4

[eluser]InsiteFX[/eluser]
I would check into the CodeIgniter Language Class and build or get from
the WIKI the French language file.

InsiteFX
#5

[eluser]Ngulo[/eluser]
sorry i can't understand you ... what you mean with language file?

can i translate url routing?

how can i? Smile

thnaks
#6

[eluser]Ngulo[/eluser]
so anybody can help me please? Sad




Theme © iAndrew 2016 - Forum software by © MyBB