Skip to content

fix(nginx): fix broken redirects and multi-hop chains#2313

Open
TC-MO wants to merge 2 commits intomasterfrom
nginx-simplification
Open

fix(nginx): fix broken redirects and multi-hop chains#2313
TC-MO wants to merge 2 commits intomasterfrom
nginx-simplification

Conversation

@TC-MO
Copy link
Copy Markdown
Contributor

@TC-MO TC-MO commented Mar 5, 2026

  • Fix 27 redirect destinations pointing to 404 pages (monitoring sub-pages, proxy examples, get-most-of-actors sub-pages, testing- and-maintenance, analyze-pages-and-fix-errors, scrape-with-sitemaps)
  • Remove 2 unreachable duplicate rewrite rules (same source pattern appearing twice with different destinations — first match always won)
  • Collapse ~80 multi-hop redirect chains into single hops: access- rights → collaboration, actors sub-pages, tutorials, development section restructure, data-collection → scraping-basics-javascript

- Fix 27 redirect destinations pointing to 404 pages (monitoring
  sub-pages, proxy examples, get-most-of-actors sub-pages, testing-
  and-maintenance, analyze-pages-and-fix-errors, scrape-with-sitemaps)
- Remove 2 unreachable duplicate rewrite rules (same source pattern
  appearing twice with different destinations — first match always won)
- Collapse ~80 multi-hop redirect chains into single hops: access-
  rights → collaboration, actors sub-pages, tutorials, development
  section restructure, data-collection → scraping-basics-javascript

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@TC-MO TC-MO requested a review from B4nan March 5, 2026 14:45
@TC-MO TC-MO self-assigned this Mar 5, 2026
@TC-MO TC-MO added documentation Improvements or additions to documentation. t-docs Issues owned by technical writing team. labels Mar 5, 2026
@apify-service-account
Copy link
Copy Markdown

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

@danpoletaev danpoletaev force-pushed the nginx-simplification branch from b3f86f9 to e96c70a Compare March 6, 2026 21:56
@apify-service-account
Copy link
Copy Markdown

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

@apify-service-account
Copy link
Copy Markdown

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

@TC-MO TC-MO marked this pull request as ready for review March 23, 2026 16:06
@TC-MO
Copy link
Copy Markdown
Contributor Author

TC-MO commented Mar 23, 2026

@B4nan I guess the branch has conflicts now from your last PR but other than that, is there any way apart from YOLO'ing it to test those changes?

@B4nan
Copy link
Copy Markdown
Member

B4nan commented Mar 23, 2026

I don't think those conflicts are from my PR (at least if we are talking about those from today), I haven't touched the redirects.

Anyway, to truly test this, you'd have to run the whole thing locally, which is surely a bit too much.

@TC-MO
Copy link
Copy Markdown
Contributor Author

TC-MO commented Mar 23, 2026

Fair enough, I'll resolve the conflicts and if I could get at least sanity check for that after I would greatly appreciate it
If something breaks we should see it in lychee report I think 🤔 or there will be a #bugs report. We can always revert this

@B4nan
Copy link
Copy Markdown
Member

B4nan commented Mar 23, 2026

Yeah, let's just not merge it late afternoon and leave that for morning instead.

Resolve conflict in nginx.conf: keep branch's chain-collapsed
destinations for get-most-of-actors redirects (actor-marketing-playbook),
but use master's monetization destination (/platform/actors/publishing/monetize)
from PR #2312. All master additions preserved (security backslash block,
client JS/Python restructuring redirects).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@apify-service-account
Copy link
Copy Markdown

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

@TC-MO
Copy link
Copy Markdown
Contributor Author

TC-MO commented Mar 25, 2026

@B4nan all conflicts resolved

Copy link
Copy Markdown
Member

@B4nan B4nan left a comment

Choose a reason for hiding this comment

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

This is what claude found, I'd fix 1. and merge, the rest can be a follow up.

 │  #  │ Severity │        File:Line         │                                                                               Description                                                                               │
 ├─────┼──────────┼──────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 │ 1   │ Low      │ nginx.conf (new line     │ Fragment anchor #what-is-a-compute-unit-cu does not exist. The heading is ### What is a compute unit which generates #what-is-a-compute-unit. The -cu suffix has no     │
 │     │          │ ~167)                    │ source.                                                                                                                                                                 │
 ├─────┼──────────┼──────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 │ 2   │ Low      │ nginx.conf (new line     │ Fragment anchor #paid-actors does not exist on /platform/actors/running/actors-in-store. That page has headings: "Pricing models", "Pay per event", "Pay per result",   │
 │     │          │ ~43)                     │ "Pay per usage", "Rental Actors", etc. The page is still reached correctly, but the fragment won't scroll to a specific section.                                        │
 ├─────┼──────────┼──────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 │ 3   │ Info     │ nginx.conf (various)     │ 12 pre-existing multi-hop chains remain unfixed (e.g. /scraping/cheerio-scraper -> /platform/tutorials/apify-scrapers/cheerio-scraper ->                                │
 │     │          │                          │ /academy/apify-scrapers/cheerio-scraper). These are out of scope for this PR but could be addressed in a follow-up.                                                     │
 ├─────┼──────────┼──────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 │ 4   │ Info     │ nginx.conf (new lines    │ Four redirects use very generic fallback destinations (/ or /academy) for pages that have no close equivalent. This is a reasonable choice when no specific replacement │
 │     │          │ ~20, 83, 153, 291)       │  exists, but results in a poor user experience for anyone following the old URL.                                                                                        │
 └─────┴──────────┴──────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

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.

3 participants