diff --git a/index.js b/index.js index 75c13b3..ced4d6e 100644 --- a/index.js +++ b/index.js @@ -14,7 +14,7 @@ module.exports = function (app, modulefolder, opts = {}, subdir = '') { let [, method, url] = regex.exec(f); url = '/' + subdir + '/' + url + '/'; url = url - .replace(/^\/root/i, '/') + .replace(/^\/[^/]*\/root/i, '/') .replace(/\./g, '/') .replace(/\/+/g, '/');