Welcome Guest, Not a member yet? Register   Sign In
URI Routing Issue
#1

[eluser]c2n[/eluser]
I have the following URL

domain.com/name/details/12345

I want it so if someone types in

domain.com/name/12345 it goes to the above

I am using $route['name/details/(:num)'] = 'name/$1';

But I get a 404 error when I try it, Any ideas?
#2

[eluser]CtheB[/eluser]
So you want to route domain.com/name/12345 to domain.com/name/details/12345 ?

Then you need your route to be this:

$route[‘name/(:num)’] = ‘name/details/$1’;
#3

[eluser]c2n[/eluser]
Thanks that works, what I tried before was without (:num) just /:num
#4

[eluser]CtheB[/eluser]
Yeah that doesn't work the () are there so '12345' will be passed to the method as the first parameter ($1)




Theme © iAndrew 2016 - Forum software by © MyBB