I have a Gatsby site using WordPress as the CMS. When you type a URL that’s supposed to redirect into the browser, it redirects as expected. But if it’s a link on a page, because there’s no page refresh it doesn’t redirect. For example, if we visit https://rosenjustice.com/service-areas/practice-areas/ it redirects to https://rosenjustice.com/practice-areas/ as expected. But if we go to https://rosenjustice.com/service-areas/practice-areas/car-accidents/bucks-county/car-accidents-attorney-in-bedminster/ and click on the Practice Areas link in the breadcrumbs, it doesn’t redirect.
It isn’t part of a Gatsby Link component, it’s a regular a tag being pulled in through GraphQL. This is what I’ve got in my _redirects file, which is in my static folder:
/service-areas/practice-areas/ /practice-areas/ 301!
Any guidance would be much appreciated.