I am moving my MediaWiki installation from Apache to Caddy and have a .htaccess file that contains some rewrite rules. I have no idea where to even start to convert it to Caddyfile format. Please help!
The equivalent Caddy rewrite directive can be found here - you should be able to convert the RewriteRule simply enough. I don’t believe it is possible to replicate those rewrite conditions in a Caddyfile, though.
Assuming you’re converting to Caddy for the automatic TLS, consider implementing it as a reverse proxy instead and leaving your Apache server running in order to take advantage of the complex rewrite conditions.