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 emailAccessibility: "[email protected]" to src/data/site.ts (mirrors the existing emailCareers pattern).
  • src/pages/accessibility.astro now references site.emailAccessibility instead of site.email for the “Reporting an accessibility issue” contact line.
  • Added BACKLOG.md item: Create [email protected] email alias — must forward to Shane/Kelli before launch or accessibility reports will bounce.

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 “Create [email protected] email alias” 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
  • Email change: dist/accessibility/index.html renders the new [email protected] address (verify with grep accessibility@ dist/accessibility/index.html)
Feedback