From 70f8a7dda13ae8154a1c3b5a925a7dbaa15a60d4 Mon Sep 17 00:00:00 2001 From: the lemons Date: Sat, 5 Feb 2022 16:06:00 -0600 Subject: fix issue wherein adding a trailing slash would bring you to the page but break all links --- zzcxz.cgi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zzcxz.cgi b/zzcxz.cgi index 704be9d..0c4b290 100755 --- a/zzcxz.cgi +++ b/zzcxz.cgi @@ -271,7 +271,7 @@ local page_template = template [[ $actions ]] -map["^/g/(%w%w%w%w%w)/?$"] = function(p) +map["^/g/(%w%w%w%w%w)$"] = function(p) local page = load_page(p) if not page then return not_found() end local _, directives = convert_markup(page.content) @@ -320,6 +320,10 @@ map["^/g/(%w%w%w%w%w)/?$"] = function(p) end end +map["^/g/(%w%w%w%w%w)/$"] = function(p) + return redirect('/g/'..p) +end + local edit_template = template [[ $content
-- cgit v1.2.3