Open cmillr opened 12 years ago
Ideally, this should be failure-proof too. It should read any URL and first look for a match based on the current URL rules. If no match is found, it should strip the extension (if it finds one) and look for a document matching that; if one is found, it should send the 301 response and redirect the browser to the canonically-correct URL.
This would mean if someone has configured .html-trailing in their URL settings, a link to example.com/foo/bar
would 301 to example.com/foo/bar.html
, and so would any other non-canonical variant.
One of the settings in the
index.php
file should be to allow the user to configure trailing characters for their paths.For example, a user should be able to put content in `/content/foo/bar.md' and configure the URL to behave in any of the following ways:
…and/or anything else the user would like to configure.