Production readiness: accessibility@ email swap + .htaccess for legacy URL preservation
What was done
1. /accessibility/ email swap
- Added
emailAccessibility: "[email protected]"tosrc/data/site.ts(mirrors the existingemailCareerspattern). src/pages/accessibility.astronow referencessite.emailAccessibilityinstead ofsite.emailfor the “Reporting an accessibility issue” contact line.- Added
BACKLOG.mditem: 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 copiespublic/*todist/*at build time, so it ships with every FTP push). - 21
RedirectMatch 301rules 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/
- 14 city pages:
- Used
RedirectMatch ^...$instead ofRedirectto anchor each pattern — prevents the shorter/development-datarule from accidentally matching/development-data-boise(Apache’sRedirectdoes prefix matching, which is unsafe here). - No explicit redirects for
/services,/projects,/contact, or/— these exist in both old and new structure andmod_dirhandles 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— addedemailAccessibilityfieldsrc/pages/accessibility.astro— switched tosite.emailAccessibilityBACKLOG.md— added “Create [email protected] email alias” item
Created
public/.htaccess— 21 legacy URL → new URL 301 redirectssrc/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/.htaccessconfirmed present after build- Email change:
dist/accessibility/index.htmlrenders the new[email protected]address (verify withgrep accessibility@ dist/accessibility/index.html)