summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwebserver.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/webserver.js b/webserver.js
index 549aebd..554dc03 100755
--- a/webserver.js
+++ b/webserver.js
@@ -107,7 +107,7 @@ function requestFile(req,res,listdirs,path){
.replace("[/*LISTINGLISTING*/]",JSON.stringify(items))
);
} else if(stats.isDirectory()&&fs.readdirSync(fname).indexOf("index.html")!=-1){
- res.sendFile(node_path.join(fname,"index.html"));
+ res.redirect(301, node_path.join(fname,"index.html"));
} else {
res.status(404).send("That file does not exist.");
return;