WDscholia / scholia

Wikidata-based scholarly profiles
https://scholia.toolforge.org
Other
222 stars 79 forks source link

Discussion on URL endings #1498

Open carlinmack opened 3 years ago

carlinmack commented 3 years ago
URL Status
https://scholia.toolforge.org/author Redirects to /
https://scholia.toolforge.org/author/ ✔️
https://scholia.toolforge.org/about ✔️
https://scholia.toolforge.org/about/ 404
https://scholia.toolforge.org/author/Q97270 ✔️
https://scholia.toolforge.org/author/Q97270/ 404
https://scholia.toolforge.org/author/Q97270/curation ✔️
https://scholia.toolforge.org/author/Q97270/curation/ 404

As we can see,

Thoughts?

egonw commented 3 years ago

Thoughts:

Following this pattern, all makes sense to me, considering an aspect landing page is like an category, and a page for a specific item (of some aspect) or actions (e.g. for curation or about). Yeah, I do see your point :)

That leaves the question of the redirect on author...

carlinmack commented 3 years ago

Researching into this, the behaviour in the original post is described in the Flask documentation. I see your logic with category vs item, however it seems nicer to use the /s as there is an in-built redirect?

I'll look into if it is possible to have the redirect's go the other way automatically.

carlinmack commented 3 years ago

It seems we can disable strict_slashes and set the canonical URL to without trailing slashes (so that search engines don't see the pages as separate).

There doesn't seem to be a consistent best practise for trailing slashes (TS). For static sites, TS are preferred as you don't need a webserver to serve extension-less web pages. On the other hand, GitHub, StackOverflow, Twitter, gov.uk etc. by default serve without TS. Of the sites I looked at, only gov.uk redirects to TS-less.

In conclusion, it's unclear. I would probably lean towards disabling strict_slashes and having without-TS as the canonical URL.

egonw commented 3 years ago

@fnielsen, your input is needed.