Skip to content
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

Guessed URL gives result rather than 404 #660

Open
mvl22 opened this issue Apr 27, 2018 · 4 comments
Open

Guessed URL gives result rather than 404 #660

mvl22 opened this issue Apr 27, 2018 · 4 comments

Comments

@mvl22
Copy link

mvl22 commented Apr 27, 2018

Guessing a URL like:
http://pct.bike/m/?r=bradford

results in a redirect to
http://pct.bike/m/?r=isle-of-wight

Instead, it should give a 404, ideally with a list of areas.

@Robinlovelace
Copy link
Member

Fixed.

@Robinlovelace
Copy link
Member

Actually not it's not. Is this an easy fix @nikolai-b / @usr110 ?

@nikolai-b
Copy link
Contributor

nikolai-b commented Apr 1, 2020

Depends...
https://github.com/npct/pct-shiny/blob/nb-html-tidy/regions_www/m/server.R#L285-L289
If the guessed query[['r']] isn't in our list of regions we could create a page showing the list of regions. Technically easy but it would take time to style it nicely and make it fit into the UI.

@mvl22
Copy link
Author

mvl22 commented Apr 2, 2020

If you show a list (which is good), you should still return a 404 status, as otherwise dodgy links will still get indexed by Google.

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

No branches or pull requests

3 participants