diff --git a/bin/gulp-dynamic-routing.js b/bin/gulp-dynamic-routing.js
index <HASH>..<HASH> 100644
--- a/bin/gulp-dynamic-routing.js
+++ b/bin/gulp-dynamic-routing.js
@@ -21,7 +21,7 @@ module.exports = function(options) {
       if(content.attributes.name) {
         file.contents = new Buffer(content.body);
         config = content.attributes;
-        var relativePath = path.relative(__dirname + path.sep + options.root, file.path);
+        var relativePath = path.relative(__dirname + path.sep + '..' + path.sep + options.root, file.path);
         config.path = '/' + relativePath.split(path.sep).join('/');
         configs.push(config);
       }
Fixed relative path on gulp plugin