Caddyfile Wordpress Multisite

Maybe you can do something like this (would strip any first path segment from the front of the URL):

uri path_regexp ^/[a-zA-Z0-9]+/wp- /wp-

Basically this would match the beginning of the path (starting with a /) followed by any number of alphanumeric characters (you can adjust this if you have any special characters to deal with like - or whatever) followed by /wp- and replace it with /wp-.

You can see how it works here, and play around with it:

3 Likes