I run a static website that has some issues with capitalization in the URI’s in the HTML code. It’s a very old site that used to run on a Windows machine and in that environment there was no distinction between upper- and lowercase characters so it worked fine.
I’m now running it on a Linux machine with Apache and to make it work I rewrite all request URI’s to lowercase. I would like to do the same with Caddy, is that possible?
In my Apache config the rewrite rule looks like this:
# Rewrite all requests to lowercase
RewriteEngine on
RewriteMap lowercase int:tolower
RewriteCond $1 [A-Z]
RewriteRule ^/?(.*)$ /${lowercase:$1} [R=301,L]
Thanks for the info guys! I can imagine it will be easy to implement for somebody with a bit of Go and programming experience. Unfortunately I’ve never done anything in Go and I’m not much of a programmer. At least now I know I don’t have to spend more time looking into a solution with Caddy’s uri + regex.