bert: Add chandlerswift.com cloudflare compat redir
Cloudflare Pages, the previous home of this site, strips the `.html` suffix from filenames (no small part of the reason this site was moved!) e.g. a recent post would be served on https://chandlerswift.com/2024/11/12/install-lineageos-on-lemonade and not on https://chandlerswift.com/2024/11/12/install-lineageos-on-lemonade.html and the latter would be redirected to the former. To me, this seems like a perversion of file paths for no good reason, and it seems that a not-insubstantial chunk of the internet agrees: https://community.cloudflare.com/search?q=%22.html%22%20%23developers%3Acloudflare-pages This has been repeatedly considered "feature not bug" (despite examples of use cases the feature breaks), e.g. https://github.com/cloudflare/workers-sdk/issues/1488 This PR used AI assistance (and manual verification) for Caddyfile syntax: https://chatgpt.com/share/67a6d4e5-a464-800c-9c4d-910faa53b2dd
This commit is contained in:
parent
510672f779
commit
437097a71b
|
@ -6,6 +6,12 @@
|
|||
root * /srv/www/chandlerswift.com
|
||||
# hide .git # ???
|
||||
|
||||
@html_redirect {
|
||||
file {path}.html
|
||||
not path *.html
|
||||
}
|
||||
redir @html_redirect {path}.html 301
|
||||
|
||||
redir /.well-known/host-meta* https://social.chandlerswift.com{uri} permanent
|
||||
redir /.well-known/webfinger* https://social.chandlerswift.com{uri} permanent
|
||||
redir /.well-known/nodeinfo* https://social.chandlerswift.com{uri} permanent
|
||||
|
|
Loading…
Reference in a new issue