diff --git a/server.js b/server.js index aad4c38..2996c23 100644 --- a/server.js +++ b/server.js @@ -280,7 +280,7 @@ class EleventyDevServer { if (indexHtmlExists && !url.endsWith("/")) { return { statusCode: 301, - url: url + "/", + url: u.pathname + "/", }; } @@ -288,7 +288,7 @@ class EleventyDevServer { if (htmlExists && url.endsWith("/")) { return { statusCode: 301, - url: url.substring(0, url.length - 1), + url: u.pathname.substring(0, u.pathname.length - 1), }; }