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!
Documentation
Caddy 2 is beta software. It is ready for production, but some things will change between releases; check the release notes before upgrading.

strip_suffix

Strips a given suffix from the request URI's path. If a matched request does not have the given path suffix, this directive is a no-op.

Syntax

strip_suffix [<matcher>] <suffix>
  • <suffix> is the suffix to strip from the request path.

Examples

Strip .html from the end of all request paths:

strip_suffix .html