Hi - Convert rules htaccess to rules caddy

1. My Caddy version 2:

convert rules

RewriteRule ^index.php$ - [L]

add a trailing slash to /wp-admin

RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.
.php)$ $2 [L]
RewriteRule . index.php [L]

for caddy

Idea is the same with what i’ve done here Caddy2 matcher / rewrite / modx - #9 by Andrey_Izotov
You can see how to use @try_files and regexp at the same time. Let us know if you get any problems.