-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trailing slash in pathname #312
Comments
It probably boils down to passing a |
Open a PR with your suggestion - if you can Mock up a small unit test for it. Ill also apply the same thing to Rudy |
ScriptedAlchemy
pushed a commit
that referenced
this issue
Oct 21, 2018
* feat(connectRoutes): add strict option for trailing delimiter /foo route's path is matching /foo and /foo/ urls by default. Setting strict option to true makes /foo match /foo url but not /foo/. fix #312 * feat(connectRoutes): add doc for strict option
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A route
/foo/
is currently matching an url/foo
and vice-versa. I suppose that this behavior comes frompath-to-regexp
and that it will not be changed as FaceySpacey indicated in #63. But:https://webmasters.googleblog.com/2010/04/to-slash-or-not-to-slash.html
It obviously has serious SEO implications. Wouldn't be usefull to add something about that in the readme, ie. test
/foo === location.pathname || redirect({ type: '/foo/' })
, if it would not be handled in RFR?The text was updated successfully, but these errors were encountered: