-
Notifications
You must be signed in to change notification settings - Fork 34
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
Getting 404 page when query params are present and routing is set to path on root route #92
Comments
On some investigation, it looks like it's coming from these lines I'm willing to make a PR for the change, but the way this is written, it appears intentional. Eager to hear feedback if a PR to change this would be accepted. |
After doing some more investigation, it appears this issue only occurs on the root route. This can be seen on the docma website as well, if you append a query parameter to the api page |
@JRJurman sorry for the late reply. How and what does facebook append as query-string? That's weird. And yes that's intentional (see this line) because same URL with a query-string actually is a different resource. If not serving it, should render 404, IMO. |
@onury when just posting the url for my site in a facebook post, this is the query parameter attached There's also a set of default query params that are attached when creating Facebook ads. Facebook will actually reject the ad because the url resolves as a 404 (with no page content). The query params there are more complicated, but mostly (probably) for tracking. Looking now it appears those can be removed in the ad configuration, but that still doesn't resolve the facebook post issue. |
Ok. Thanks for the info. I'll look into this. |
Summary
I've noticed for my site (and the docma site) that query parameters are not ignored if they are included at the end of a path - even though the routing is set to work with the path.
For example, instead of ignoring (or removing) the query param, the page for
https://onury.io/docma/?example
shows a 404 page.When advertising or posting on sites like Facebook, they can automatically include query params, so being able to ignore these would be super valuable.
The text was updated successfully, but these errors were encountered: