Redirects URI

This commit is contained in:
2018-07-28 19:31:49 +02:00
parent aac4e47411
commit 09c935b565
2 changed files with 2 additions and 2 deletions

View File

@ -200,7 +200,7 @@ bool connection_handler(const char *preprefix, const char *col1, const char *col
req.redirect(303, "https://www.necronda.net/");
} else if (socket->getSocketPort() != 443) {
req.redirect(303, "https://" + host + req.getPath());
} else if (getWebRoot(host).empty()) {
} else if (getWebRoot(host) == "/") {
req.redirect(303, "https://www.necronda.net" + req.getPath());
} else {
redir = false;

View File

@ -195,7 +195,7 @@ string getWebRoot(string host) {
if (fileExists(root)) {
return root;
} else {
return "";
return "/";
}
}