feat: redirects from .htaccess and Simple 301, gone rules served, Redirection flags, redirects_excluded - #38
Conversation
…erved, Redirection's matching flags, redirects_excluded in RawIR - .htaccess (read only, ABSPATH): Redirect* as prefix rules, RedirectMatch and RewriteRule [R]/[G] as regex rules (leading slash and RewriteBase applied); RewriteCond/<If> rules excluded as conditional, internal rewrites and [F] accounted for; not served under nginx. - Simple 301 Redirects: plain rules, wildcards as regex. - 410/451 from every source are served rules with an empty target. - Redirection: query, case and trailing-slash flags as Red_Source_Flags resolves them (fresh install, site options, the rule's own); Rank Math ignore:case. - RawIR redirects_excluded; attachments carry their page link. - tests/redirect-parity.php runs the shared fixture (draft, pin follows wp-import's merge).
…ut of the export A Redirection rule matched on anything but login keeps only its type (the reason); a RewriteCond or <If> is recorded by what it tests (cookie, header, ip, host...), never the value. Canary test for each. Pins the redirect parity fixture to Contentrain/ai 2578366.
|
t6 QA — Bridge #38 (ee538c5): ONAY (CI small ve acceptance koşuyor; yeşil olunca birleşebilir) + bir aşağı akış notu Güvenlik notum uygulanmış:
Diğerleri:
Aşağı akış notu (bloklamıyor, t7/t4 için): yeni |
…rent's slug stays out)
|
t6 QA — Bridge #38 0c0948a: ONAY. Üst öğesi public olmayan (taslak, özel, zamanlanmış ya da parolalı) bir ekin |
Bridge side of t7's source-redirects design (orchestrator-approved), on the ai #302 types.
ABSPATH/.htaccess, outside# BEGIN WordPress):Redirect*→match: start(mod_alias is a prefix: /a/x → /b/x),RedirectMatchandRewriteRule [R]→ regex, pattern given its leading/withRewriteBase;[G]→ 410;[NC]→case_insensitive;querypass/ignore as Apache does.RewriteCond/<If>/<Files>rules excludedconditional-match:htaccess; internal rewrites,[F], negated patterns accounted for asnot-a-redirect:*. nginx:inactive-with-data,source-inactive; WordPress in a subdirectory gets a note.to: ''.query,case_insensitive,trailing_slash) asRed_Source_Flagsresolves them: base exact/false/false, fresh install (options never saved) ignores case and slash, site options then the rule's own override, regex → query exact,exactorder→ exact. Rank Mathignore: case.redirects_excluded(PHP andtools/prepare-migrate.mjs); attachments carrylink(get_attachment_link()).RewriteCond/<If>is recorded by what it tests (cookie,header,ip,host…). Canary test for each.tests/redirect-parity.phprunscontentrain-redirect-parity@1(pinned to ai2578366, byte-identical) throughRedirects::redirection_rules; 3/3 (the fourth case is REST-only).Local: test:wordpress (329 checks), test:seo (live site answers each .htaccess, Simple 301, Redirection flag and 410 rule as exported), test:e2e, test:coverage, npm test — all pass.