openrightsgroup / cmp-issues

Centralised issue-tracking for the Blocked backend
2 stars 0 forks source link

Handle trailing backslashes on all pages on Blocked #222

Closed edjw closed 5 years ago

edjw commented 5 years ago

As any user of the site, I would like to be redirected to the correct URL if I use a trailing backslash. When I visit a URL with a trailing backslash like https://www.blocked.org.uk/stats/, I should be redirected to the correct URL:https://www.blocked.org.uk/stats

At the moment, URLs like this one (https://www.blocked.org.uk/control/) with trailing backslashes return 404 Not Found.

dantheta commented 5 years ago

I think it usually works the other way round, doesn't it?

If the canonical URL is "/page/", then visiting "/page" would redirect to "/page/"

In these cases, the canonical URL is '/page', though there may be sub-pages at "/page/add or "/page/edit".

I take your point though, this could be a violation of the principal of least surprise.

We'd generally hope that the on-page navigation is good enough that people don't have to hand-hack URLs :)

I think the other ticket about redirection/help from the 403 responses is an important fix for some of these issues.

edjw commented 5 years ago

Ok let's close this for now and proceed with #221 and see how it goes