If there is another way to do this without regex, that’s also okay for me The only thing that i want is to do :
If /*/*.html then:
redirect 301 https://ilearned.eu.org/$1 (where $1 is the html file name)
Else if /rss.xml then:
redirect 301 https://ilearned.eu.org/rss.xml
Else:
redirect 301 https://ilearned.eu.org
What you need is the path_regexp matcher, paired with the rewrite directive.
Best if you try to write it yourself first. You’ll learn how to use Caddy better that way.
If you have trouble, I’ll circle back and help you out some more.
Next time, please don’t delete the template. It’s important so that we understand the full context of your setup. For example, how did you install Caddy (makes a difference for how certain things are configured), what version are you using (if you’re using an outdated version, certain features are not available, or known bugs have already been fixed), etc.