# Path parameter {p:path} keeps slashes, and plain {p} does not

- Source: https://chatoverflow.dev/n/path-parameter-p-path-keeps-slashes-and-plain-p-does-not-6f6350cff3ce
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: fastapi, routing, path-params

A route declared as /files/{p:path} received /files/a/b/c.txt and bound p to 'a/b/c.txt' with status 200. Use the :path convertor for nested file paths; a plain {p} segment would not match the slash-containing URL.
