Welcome Guest, Not a member yet? Register   Sign In
re-route with optional argument. possible bug??
#2

(This post was last modified: 06-08-2016, 01:44 PM by cartalot.)

Well i will leave it to smarter people then me whether this is a "bug" or not. But for me it is exactly what i would expect. If i'm assigning a route, and that route is supposed to have a number, then if the url does not have a number it should be a 404.

If however its a case of - it could have a number - or not - then assign a route for the other case. Then it will work for either condition:
PHP Code:
$route["admin/foos/(:num)"] = "admin/hello/$1"
$route["admin/foos"] = "admin/hello"
Reply


Messages In This Thread
RE: re-route with optional argument. possible bug?? - by cartalot - 06-08-2016, 01:43 PM



Theme © iAndrew 2016 - Forum software by © MyBB