Alright! Now we’ve got a known working configuration, it’s time to slowly - one-by-one - add the other directives and snippets back in to your Caddyfile.
If/when it breaks again, you should be able to pin-point what the problematic configuration is.
Could be a bug of some kind in recent versions… The cache plugin is developed by @nicolasazrak:
If you could narrow your Caddyfile down to the simplest possible version that breaks with cache present (does it happen just with cache and any rewrite?) and post an issue to that Github repository (possibly linking to this forum thread), he should be better able than I to help sort it out.
Unfortunatelly this plugin seems to be abandonned, there is another person in issues who reported that cache breaks redir behavior, i believe it’s the same problem… But no reaction from author and last commin in Aug 2017
Author of cache module here. Sorry if it seems abandoned. I’m not adding new features but I’m looking if an issue appears. I’ll try to investigate both of the opened issues.