pct-shiny icon indicating copy to clipboard operation
pct-shiny copied to clipboard

Guessed URL gives result rather than 404

Open mvl22 opened this issue 7 years ago • 4 comments

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.

mvl22 avatar Apr 27 '18 08:04 mvl22

Fixed.

Robinlovelace avatar Apr 01 '20 13:04 Robinlovelace

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

Robinlovelace avatar Apr 01 '20 13:04 Robinlovelace

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.

nikolai-b avatar Apr 01 '20 22:04 nikolai-b

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.

mvl22 avatar Apr 02 '20 08:04 mvl22