aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthe lemons <citrons@mondecitronne.com>2022-02-05 16:06:00 -0600
committerthe lemons <citrons@mondecitronne.com>2022-02-05 16:06:00 -0600
commit70f8a7dda13ae8154a1c3b5a925a7dbaa15a60d4 (patch)
treee9694f015df87e855e151e70d90a7473f706dae2
parent2621b312b16be1262dc26b536467840d2c558100 (diff)
fix issue wherein adding a trailing slash would bring you to the page but break all links
-rwxr-xr-xzzcxz.cgi6
1 files changed, 5 insertions, 1 deletions
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
</ul>
]]
-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
<hr id="what"/>