diff --git a/svr.js b/svr.js index ff2a8a2..5e258f3 100644 --- a/svr.js +++ b/svr.js @@ -4587,6 +4587,10 @@ if (!cluster.isPrimary) { var location = ""; if (regexI[nonscodeIndex]) { location = req.url.replace(regexI[nonscodeIndex], nonscode.location); + if(location == req.url) { + // Fallback replacement + location = hrefWithoutDuplicateSlashes.replace(regexI[nonscodeIndex], nonscode.location); + } } else if (req.url.split("?")[1] == undefined || req.url.split("?")[1] == null || req.url.split("?")[1] == "" || req.url.split("?")[1] == " ") { location = nonscode.location; } else {