Is there documentation on guidelines on porting Apache mod_rewrite rules into Caddyfile expressions somewhere?

1. The problem I’m having:

Hi! The case I’m tackling is an old machine with Apache running PHP Symfony code, which itself replaced an even older machine with Apache running plain PHP code, and due to that it ported a compact and cleaner format of URLs to the old one with normal parameters, by using mod_rewrite.

I have been mucking around with rewrite and path_regexp but honestly am confused and quite unsure what are the guidelines in this case, if any, So, i am hoping someone has at some point done some documenting of "If you come from mod_rewrite with regexes you should in general do this and that.

The rewrites in this case are not TOO bad (i’ve seen some before that are a doozy, thankfully in this case is simply changing some parts of the URL to other positions), but still feels confusing

The old format was the traditional
https://domain/something.php?param1=X&param2=Y&param3=Z
and so on, likely with some extra “constant” parameters no longer in use but still added for backwards compatibility

The current format is directly
https://domain/something/X/Y/Z
with the parameters just mapped to positions in the URL

So, the current Apache config lines are about a dozen in the style of

RewriteRule "^something/(.+)/(.+)/([0-9]+)$" "/something.php?param1=$1&param2=$2&param3=$3" [L]

My current best attempt at porting that to Caddy has been

@something {
  path_regexp something ^/something/(.+)/(.+)/([0-9]+)$
}
rewrite @something /something.php?param1={re.something.1}&param2={re.something.2}&param3={re.something.3}

I think this should work as expected, but i have no idea if this is the CORRECT way to do this, or if there is any, maybe there is a right way to do it and is not this.

2. Error messages and/or full log output:

There is no error logs yet as I’m still in Caddyfile writing

3. Caddy version:

2.11.2

4. How I installed and ran Caddy:

Installed through the official Debian packages on Cloudsmith
Fresh Debian Stable 13, with systemd, with the systemd config from the package on Cloudsmith

5. Links to relevant resources:

None that i can think about at the moment