Convert nginx to caddy not worting

caddy version: 2.4.6
in nginx the rewrite code is

location / {
	if (!-e $request_filename) {
	  rewrite ^/(.*)$ /index.php?/$1 last;
		break;
	}
}

and it working fine.

how to convert it to caddy?

Caddy v2.4.6 is a very old version. Please use the latest version.

Please fill out the help topic template as per the forum rules.

1 Like