Welcome Guest, Not a member yet? Register   Sign In
URI routing with subdirectory

I've found a weird error while working with URI-routing. Maybe the problem has something to do with my use of subdirectories.

I want to route a ID to a class without defining any method. The class is in a subdirectory.

$route["subdir/myclass/(\d+)"] = "subdir/myclass/index/$1";

Now I can't receive the ID in my index method.

function index($id = 0)
            echo $id;

But the funny thing is that if I rewrite the route like this it will work.

$route["subdir/myclass/(\d+)"] = "subdir/myclass/index/something/$1";

I've added the "something" in the URI.

Is this a bug?

Anyone who can help me with this?

Unfortunately, I think that $route[..] is not working properly with sub directories.

Theme © iAndrew 2016 - Forum software by © MyBB