3 Commits

Author SHA1 Message Date
f4beb15a3b make directory redirects absolute paths
I think this is always the right choice, since we're rewriting the full
input path
2021-04-17 15:06:39 -05:00
da447d2873 Merge branch 'master' of git.incorporeal.org:bss/incorporeal-cms 2021-04-17 14:57:20 -05:00
f46bff6ec6 tweak language around the email 2021-02-23 13:16:58 -06:00
2 changed files with 2 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ def display_page(path):
except PermissionError: except PermissionError:
abort(400) abort(400)
except IsADirectoryError: except IsADirectoryError:
return redirect(f'{path}/', code=301) return redirect(f'/{path}/', code=301)
except FileNotFoundError: except FileNotFoundError:
abort(404) abort(404)

View File

@@ -10,7 +10,7 @@
<div class="content"> <div class="content">
<h1>NOT FOUND</h1> <h1>NOT FOUND</h1>
<p>Sorry, <b><tt>{{ request.path }}</tt></b> does not seem to exist, at least not anymore.</p> <p>Sorry, <b><tt>{{ request.path }}</tt></b> does not seem to exist, at least not anymore.</p>
<p>It's possible you followed a dead link on this site, in which case I would appreciate it if you could email me via: <p>It's possible you followed a dead link on this site, in which case I would appreciate it if you could email me at
{{ config.CONTACT_EMAIL }} and I can take a look. I make an effort to symlink old content to its new location, {{ config.CONTACT_EMAIL }} and I can take a look. I make an effort to symlink old content to its new location,
so old links and URLs should, generally speaking, work.</p> so old links and URLs should, generally speaking, work.</p>
<p>Otherwise, I suggest you go <a href="/">to the index</a> and navigate your way (hopefully) to what <p>Otherwise, I suggest you go <a href="/">to the index</a> and navigate your way (hopefully) to what