Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Feature request: Add option to remove trailing slash #11

Open
jerelmiller opened this issue Dec 7, 2020 · 0 comments
Open

Feature request: Add option to remove trailing slash #11

jerelmiller opened this issue Dec 7, 2020 · 0 comments

Comments

@jerelmiller
Copy link

Hey there! Thanks so much for this plugin! This plugin has been super valuable in the Gatsby websites we are building over at New Relic.

It would be amazing if we could add the option to remove the trailing slash when generating redirects. We have a situation where we need to be able to redirect from one path to another, with the new path needing query params. The query param redirect works correctly, but unfortunately the new path gets a trailing slash afterward.

For example, we need a redirect like the following:

From path: /attribute-dictionary/transaction/appname
To path: /attribute-dictionary/?event=Transaction&attribute=appName

Specifying that in the createRedirect works as we expect, but when executing in the browser, the URL becomes: /attribute-dictionary/?event=Transaction&attribute=appName/ (note the trailing slash at the end of the query params).

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant