Skip to content
Snippets Groups Projects
Commit 2bb0ca81 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Do the redir thing for all requests not ending in /, not just dirs

parent a7a87f8a
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -113,12 +113,13 @@ function root_index()
}
}
if(http_request.virtual_path[http_request.virtual_path.length - 1] != '/') {
http_reply.status = "301 Moved";
http_reply.header.Location = http_request.virtual_path + '/';
exit();
}
if(http_request.dir !== undefined) {
if(http_request.virtual_path[http_request.virtual_path.length - 1] != '/') {
http_reply.status = "301 Moved";
http_reply.header.Location = http_request.virtual_path + '/';
exit();
}
dir_index(http_request.dir);
} else if (http_request.lib !== undefined) {
lib_index(http_request.lib);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment