I have an URL like …/news/10579/13.-august-2007 which results in
404 Not Found
In this case, the last part of the URL is irrelevant for my app and only food for search engines or human readers.
Changing the dot to any of the punctuation marks in “,;:” works fine. I have not experienced this error with any other link and no problem with other engines like apache or nginx or yaws, so this flaw definitely applies to caddy alone.
Hi @kklepper, welcome to the Caddy community. This one’s a deceptively simple one.
The dot acts as a file extension. With ext /, you’ve excluded any path with a file extension from the rewrite, so the request goes through unaffected, and of course fails when there’s no matching file on disk.
P.S: Drop the regexp .*. You’re just matching all requests - which rewrite does by default - except you’re spinning up a regex matcher, which is a waste of CPU cycles.