This page is about Caddy 2, which is currently in beta. Click here for the old Caddy 1 site. Thank you for your patience as we transition!
Caddy 2 is beta software. It is ready for production, but some things will change between releases; check the release notes before upgrading.


Performs a substring or regular expression replacement in the request URI.


uri_replace [<matcher>] <find> <replace> [<limit>]
  • <find> is the substring or regular expression to search for.
  • <replace> is the replacement value.
  • <limit> is an optional limit to the number of replacements.


Replace "/docs/" with "/v1/docs/" in any request URI:

uri_replace * /docs/ /v1/docs/