Changeset

1384:f67eacb1ac9f

mod_candy: Redirect from /candy -> /candy/
author Kim Alvefur <zash@zash.se>
date Fri, 11 Apr 2014 14:58:44 +0200
parents 1383:465e5d79551b
children 1385:da9469e68dee
files mod_candy/mod_candy.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_candy/mod_candy.lua	Thu Apr 10 22:40:11 2014 +0200
+++ b/mod_candy/mod_candy.lua	Fri Apr 11 14:58:44 2014 +0200
@@ -23,6 +23,10 @@
 					}));
 		end;
 		["GET /*"] = serve(module:get_directory().."/www_files");
+		GET = function(event)
+			event.response.headers.location = event.request.path.."/";
+			return 301;
+		end;
 	}
 });