14 State resource page redirects - 18F/federalist-jekyll-netlify-cms-guides GitHub Wiki
As of March 2022, the production version of ChildCare.gov and the beta version have a different URL schema to represent the state resource pages. This was a concern for the team building the Jekyll beta version — we wanted to address this so that any existing backlinks on the web or bookmarks added by users would still work. Below is a table that shows the difference in URL schema between the two versions of the site.
Current ChildCare.gov State URL | Beta.ChildCare.gov State URL |
---|---|
/state-resources?state=6 | /state-resources/alabama/ |
/state-resources?state=6&type=201 | /state-resources/alabama/ |
/state-resources?state=6&type=202 | /state-resources/alabama/financial-assistance-for-families/ |
/state-resources?state=6&type=203 | /state-resources/alabama/health-and-social-services/ |
/state-resources?state=6&type=204 | /state-resources/alabama/child-development-and-early-learning/ |
There’s a file named en/state-resources/index.md
that uses the _layouts/redirect.html
layout to create a <meta>
redirect element on the page so that when anyone arrives at /state-resources/
an attempt can be made to find out which state they were were attempting to reach from the old state resource URL schema and then redirect them to the proper state resource page.