The list is in config/redirectRules.ts (exact paths, from the old sitemap), written into dist/client by the build; check-artifact.sh requires it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
3.7 KiB
3.7 KiB
Redirects of the old WordPress addresses (redirects.json)
The old site of andreaslop.nl was a WordPress site. Its addresses that are still indexed get a redirect (or "gone") on the new site. The site is the source of the list; the CMS host reads it and applies it the same on test and on production. The inventory of the old addresses is in aidlc-docs/features/asf-production-iis/oude-urls.md.
Where it comes from
- The list is in code:
web/config/redirectRules.ts(with tests inredirectRules.test.ts). pnpm buildends withweb/config/writeRedirects.ts, which writesdist/client/redirects.json, next toindex.html. The deploy puts it in the prerendered-pages folder of the host (on test with the rest ofdist-test, on production with the FTP upload).deploy/check-artifact.shrefuses a build without it.- Change the list only in
redirectRules.ts; the file is never edited by hand.
Format (agreed with the CMS session, design of 2026-11-18)
{
"version": 1,
"redirects": [
{ "from": "/portfolio-item/decoration", "to": "/portfolio", "status": 301 },
{ "from": "/feed", "status": 410 }
]
}
from: a path with one leading slash, without query string, fragment or... The first segment is neveradmin,healthorapi. The host matches it case insensitive and with or without a slash at the end, so a path is given once (both forms count as a duplicate).status:301,404or410.to: required for a 301 (a path of this site, or an absolutehttps://address; this list only uses paths) and not allowed for 404 and 410. It is never the same asfrom, and never itself a rule (no chains).- No patterns, no wildcards, no query-string rules (decision of Bryan: only plain paths). At most 5000 rules and 1 MB.
- The host answers a 301 with
LocationandCache-Control: max-age=3600, a 404 or 410 with the 404 page of the site as the body. A rule wins over an existing file. Only GET and HEAD.redirects.jsonitself is not served.
What is in the list
| Old address | Answer |
|---|---|
/sitemap_index.xml, /wp-sitemap.xml and the five old sub-sitemaps |
301 to /sitemap.xml |
/portfolio-item and the 15 items of the old sitemap |
301 to /portfolio |
/portfolio-tag/{homepage,portfolio-gallerij,simple} |
301 to /portfolio |
/testimonials-category/photo |
301 to / |
/masonry-gallery-category/test-masonry-gallery (theme demo), /feed, /comments/feed |
410 |
Not in the list on purpose:
- The real pages (
/over-mij/,/portfolio/,/soorten-fotoshoots/,/contact/): the host redirects the slash, case and.htmlvariants canonically (web/config/canonicalUrls.ts); the slugs are the same as on the new site. - Query-string addresses (
/?page_id=17,/?s=...): decision of Bryan. - Addresses that are a 404 anyway:
/wp-admin,/wp-login.php,/xmlrpc.php,/wp-json,/wp-content,/category,/tag,/author. A path without a rule gives the 404 page already.
Open
- Whether to check Google Search Console and external links (Instagram, Google Business Profile) for other old addresses before the old site is switched off; if there are any, add them to
redirectRules.ts. - After the host reads the file (CMS repo, small PR of SMC): add a check to
deploy/verify-deployment.sh --cmsthat/portfolio-item/decoration/gives a 301 to/portfolio.