apify / apify-docs

This project is the home of Apify's documentation.
https://docs.apify.com
Apache License 2.0
29 stars 76 forks source link

docs.apify.com/sdk/ returns 404, docs.apify.com/sdk returns 200 #1102

Open honzajavorek opened 3 months ago

honzajavorek commented 3 months ago

When working on https://github.com/apify/apify-docs/pull/1101 I found that:

I don't experience any issues in the browser, but link checks and possibly other tooling see the difference. I'd expect redirect, but not 404.

B4nan commented 3 months ago

Duplicate of #520, its not that simple as you might think, and boils down to how docusaurus handles the trailing slash and the fact that there are more instances routes to the same domain.

B4nan commented 3 months ago

Oh wait, this is a bit different, you are talking about the new SDK landing page. But still, this is how docusaurus handles it I am afraid (and it is the case for every single "content" page, not just for the /sdk one), we set it up so there are no trailing slashes (with the exception of the child docusaurus instances, like https://docs.apify.com/sdk/js/ but we have 302 redirects there for the variant without trailing slash).

Maybe we could try to set the redirects up on nginx level, but it feels a bit scary since there are exceptions in the opposite direction (you want a redirect from /sdk/ to /sdk, but at the same time you want the opposite for /sdk/js, but again, not for anything nested like /sdk/js/docs). I'll leave this open.