Trailing slashes in paths
Option Enforce trailing slashes

The validator Enforce trailing slashes is disabled by default.

For legacy mappings, the trailing slashes behavior will be preserved in status ON.

Enforce trailing slashes disabled (default validator)

The default validator forces that both paths either have a trailing slash or that both paths do not have a trailing slash.

Example with trailing slashes:

Entry path: /path/
Back-end path: /back-end/

  • A request to /path/target matches and is forwarded to /back-end/target.
  • A request to /path does not match:
    • If no other mapping matches, this request will return Page Not Found.

Example without trailing slashes:

Entry path: /path
Back-end path: /back-end

  • A request to /path/target matches and is forwarded to /back-end/target.
  • A request to /path does match and is forwarded to /back-end.

Enforce trailing slashes enabled

Example with trailing slashes:

Entry path: /path/
Back-end path: /back-end/

  • A request to /path/target matches and is forwarded to /back-end/target.

Example with trailing slashes:

Entry path: /path
Back-end path: /back-end/

  • The missing trailing slash of /path will be automatically complemented to /path/.

Further information and links