diff options
author | the lemons <citrons@mondecitronne.com> | 2022-02-05 16:06:00 -0600 |
---|---|---|
committer | the lemons <citrons@mondecitronne.com> | 2022-02-05 16:06:00 -0600 |
commit | 70f8a7dda13ae8154a1c3b5a925a7dbaa15a60d4 (patch) | |
tree | e9694f015df87e855e151e70d90a7473f706dae2 | |
parent | 2621b312b16be1262dc26b536467840d2c558100 (diff) |
fix issue wherein adding a trailing slash would bring you to the page but break all links
-rwxr-xr-x | zzcxz.cgi | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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"/> |