Trailing slash redirect broken when using path prefix #39043
Labels
status: triage needed
Issue or pull request that need to be triaged and assigned to a reviewer
type: bug
An issue or pull request relating to a bug in Gatsby
Preliminary Checks
Description
A project using
pathPrefix
andtrailingSlash
does not redirect properly.When a page is loaded and requires a redirect due to the slash, the redirect does not take
pathPrefix
into account.Reproduction Link
https://github.com/patrickdemers6/gatsby-slash-redirect-path-prefix-bug
Steps to Reproduce
pathPrefix
to anything.trailingSlash
tonever
.gatsby build --prefix-paths
andgatsby serve --prefix-paths
Example:
pathPrefix = /prefix
Expected Result
The redirect removes just the trailing slash.
Expected
/prefix/hello/
=>/prefix/hello
Actual Result
The redirect removes the slash and the pathPrefix.
Actual
/prefix/hello/
=>/hello
Environment
Config Flags
No response
The text was updated successfully, but these errors were encountered: