Skip to content

docs: add redirects for removed landing pages#2213

Open
TC-MO wants to merge 3 commits intomasterfrom
add-redirects
Open

docs: add redirects for removed landing pages#2213
TC-MO wants to merge 3 commits intomasterfrom
add-redirects

Conversation

@TC-MO
Copy link
Contributor

@TC-MO TC-MO commented Feb 1, 2026

Note

Low Risk
Only changes URL rewrite/redirect behavior for a handful of docs entry routes; risk is limited to potential misrouting or caching effects from switching to permanent redirects.

Overview
Updates nginx.conf rewrite rules to replace trailing-slash normalization redirects for /api/client/*, /sdk/*, and /cli with permanent redirects that send those root paths directly to the appropriate docs landing pages (e.g., /api/client/js/api/client/js/docs, /sdk/js/sdk/js/docs/overview).

Written by Cursor Bugbot for commit edd694a. Configure here.

@TC-MO TC-MO self-assigned this Feb 1, 2026
@TC-MO TC-MO added documentation Improvements or additions to documentation. t-docs Issues owned by technical writing team. labels Feb 1, 2026
@apify-service-account
Copy link

Preview for this PR was built for commit c5c32bc and is ready at https://pr-2213.preview.docs.apify.com!

@TC-MO TC-MO marked this pull request as ready for review February 2, 2026 14:27
@apify-service-account
Copy link

Preview for this PR was built for commit edd694a9 and is ready at https://pr-2213.preview.docs.apify.com!

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Comment @cursor review or bugbot run to trigger another review on this PR

rewrite ^/api/client/python/?$ /api/client/python/docs/overview permanent;
rewrite ^/sdk/js/?$ /sdk/js/docs/overview permanent;
rewrite ^/sdk/python/?$ /sdk/python/docs/overview permanent;
rewrite ^/cli/?$ /cli/docs permanent;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rewrite rules break LLM markdown serving for root paths

Medium Severity

The new rewrite rules with permanent flag execute during nginx's rewrite phase before location matching. This means requests to /sdk/js, /sdk/python, /api/client/js, /api/client/python, and /cli will receive 301 redirects before the location = blocks can check $serve_markdown and serve llms.txt content. LLM clients requesting markdown content at these root paths will be redirected to docs pages instead of receiving the expected LLM text files.

Fix in Cursor Fix in Web

@B4nan
Copy link
Member

B4nan commented Feb 2, 2026

To fix the buld you will need to adjust the tests for the accept header, since they check the pages you are now redirecting. It's directly in the workflow:

https://github.com/apify/apify-docs/actions/runs/21593890821/workflow?pr=2213#L66

(I can try to fix this myself if it feels too scary)

@TC-MO
Copy link
Contributor Author

TC-MO commented Feb 2, 2026

I'll try to figure it out with help of claude if not then I'll ping for some help, thanks!

@apify-service-account
Copy link

Preview for this PR was built for commit 974f9d30 and is ready at https://pr-2213.preview.docs.apify.com!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation. t-docs Issues owned by technical writing team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants