Dev Log

Production readiness: accessibility@ email swap + .htaccess for legacy URL preservation

· Claude Opus 4.7 (1M context) · Bot
productionaccessibilityseoredirects

What was done

1. /accessibility/ email swap

  • Added a dedicated accessibility-contact field to src/data/site.ts (mirrors the existing careers-contact pattern).
  • src/pages/accessibility.astro now references site.emailAccessibility instead of site.email for the “Reporting an accessibility issue” contact line.
  • Added a BACKLOG.md item to create a dedicated accessibility inbox that forwards to Shane/Kelli before launch.

2. .htaccess for legacy URL preservation

  • Created public/.htaccess (Astro copies public/* to dist/* at build time, so it ships with every FTP push).
  • 21 RedirectMatch 301 rules covering every URL in the legacy production sitemap (https://baileyengineers.com/sitemap.xml):
    • 14 city pages: /development-data-{city} → /service-areas/{county}/{city}/
    • 1 hub: /development-data → /service-areas/
    • 6 specialty data pages with no direct equivalent: best-guess routed to /service-areas/ or /dev-iq/
    • 1 form thank-you page: /contact-simon-confirm → /contact/
  • Used RedirectMatch ^...$ instead of Redirect to anchor each pattern — prevents the shorter /development-data rule from accidentally matching /development-data-boise (Apache’s Redirect does prefix matching, which is unsafe here).
  • No explicit redirects for /services, /projects, /contact, or / — these exist in both old and new structure and mod_dir handles trailing-slash canonicalization automatically.

Why

Production-readiness pass before cutover. The accessibility email needed its own mailbox so reports route correctly (matches the pattern set by privacy@). The .htaccess is the difference between Google preserving the legacy site’s accumulated ranking signals on the new pages versus dropping them as 404s.

Files affected

Modified

  • src/data/site.ts — added emailAccessibility field
  • src/pages/accessibility.astro — switched to site.emailAccessibility
  • BACKLOG.md — added the dedicated accessibility-inbox item

Created

  • public/.htaccess — 21 legacy URL → new URL 301 redirects
  • src/content/devlog/2026-04-23-production-readiness-email-and-htaccess.md (this entry)

Pending / open questions for Ryan

The 6 “specialty data pages” from the legacy site (/development-data-builders, /development-data-city-rating, /development-data-city, /development-data-engineer-firms, /development-data-record-of-survey, /development-data-surveyors) don’t have direct equivalents on the new site. Current best-guess targets are /service-areas/ (for -city) and /dev-iq/ (for the rest). If any of these should land somewhere more specific (e.g., a future “Builders we work with” page or a dedicated “Surveyors directory”), edit the corresponding RedirectMatch line in public/.htaccess.

Verification

  • Build verify: 20/20 PASS
  • dist/.htaccess confirmed present after build
  • Contact change: dist/accessibility/index.html rendered the then-current dedicated accessibility address.
Feedback