Routes specified in routes
follow the same pattern as the Next.js .
MUST start with /
Can include named parameters: /about/:path
matches /about/a
and /about/b
but not /about/a/c
Can have modifiers on named parameters (starting with :
): /about/:path*
matches /about/a/b/c
because *
is zero or more. ?
is zero or one and +
one or more
Can use regular expression enclosed in parenthesis: /about/(.*)
is the same as /about/:path*
Read more details on documentation.