{"action":"opened","issue":{"url":"https://api.github.com/repos/alexmingoia/koa-router/issues/155","labels_url":"https://api.github.com/repos/alexmingoia/koa-router/issues/155/labels{/name}","comments_url":"https://api.github.com/repos/alexmingoia/koa-router/issues/155/comments","events_url":"https://api.github.com/repos/alexmingoia/koa-router/issues/155/events","html_url":"https://github.com/alexmingoia/koa-router/issues/155","id":97912930,"number":155,"title":"Nested routers with router prefix responds with the status code 404","user":{"login":"roshangade","id":13249351,"avatar_url":"https://avatars.githubusercontent.com/u/13249351?v=3","gravatar_id":"","url":"https://api.github.com/users/roshangade","html_url":"https://github.com/roshangade","followers_url":"https://api.github.com/users/roshangade/followers","following_url":"https://api.github.com/users/roshangade/following{/other_user}","gists_url":"https://api.github.com/users/roshangade/gists{/gist_id}","starred_url":"https://api.github.com/users/roshangade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roshangade/subscriptions","organizations_url":"https://api.github.com/users/roshangade/orgs","repos_url":"https://api.github.com/users/roshangade/repos","events_url":"https://api.github.com/users/roshangade/events{/privacy}","received_events_url":"https://api.github.com/users/roshangade/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-29T11:04:54Z","updated_at":"2015-07-29T11:04:54Z","closed_at":null,"body":"I tried to explore the **[nested routers](https://github.com/alexmingoia/koa-router#nested-routers)** by adding the [router prefix](https://github.com/alexmingoia/koa-router#router-prefixes) in it, but it responds with the status code 404.\r\n\r\nHere is working example without adding the router prefix:\r\n```js\r\nvar forums = new Router();\r\nvar posts = new Router();\r\n\r\nposts.get('/', function *(next) {...});\r\nposts.get('/:pid', function *(next) {...});\r\nforums.use('/forums/:fid/posts', posts.routes());\r\napp.use(forums.routes());\r\n\r\n```\r\n\r\nAnd here is the nested routers with the router prefix, which is not working:\r\n```js\r\nvar forums = new Router({\r\n    'prefix': '/forums'\r\n});\r\nvar posts = new Router({\r\n    'prefix': '/:fid/posts'\r\n});\r\n\r\nposts.get('/', function *() {\r\n    this.body = 'posts'\r\n});\r\nposts.get('/:pid', function *() {\r\n    this.body = 'post'\r\n});\r\n\r\nforums.use(posts.routes()); // OR forums.use('/', posts.routes());\r\n\r\nobj.use(forums.routes());\r\n```\r\n\r\nCould you please suggest or help me here. Thanks in advance."}}