V5.x collections AMP post --> redirect error

self hosted on DO
Ghost version: 5.5
Node version: 14.19.3
db: mysql
ghost doctor identifies no errors

After upgrade to v5.x amp versions of urls in routes.yaml > collections causes an ugly browser error: “The page isn’t redirecting properly”. The inspector tools network tab show a long chain of 301 redirects to the same url. Presumably it just times out.

from routes.yaml:

    permalink: /docs/{slug}/
    filter: primary_tag:docs
    data: tag.docs
    template: tag

    permalink: /{slug}/

Amp url from collection that causes redirect error: https://lexchart.com/docs/account/amp/
Non-amp version of same collection url returns 200: https://lexchart.com/docs/account/
Amp version of post NOT in collection returns 200: https://lexchart.com/private-equity-energy-fund/amp/
Non-amp version of same post NOT in collection returns 200: https://lexchart.com/private-equity-energy-fund/

I would like the amp urls for posts in collections to return a 200 code and load properly. Any guidance?


:thinking: I’m not sure what would’ve changed in v5 to cause this error.

Do you have any redirects set up in addition to your routes?

I should have been more precise. I do not necessarily attribute the issue to v5. Rather, I did not experience the issue prior to v5, and do experience it after v5. The source could be something else.

The redirects.json file contains one redirect for a specific post, so I do not think that is the issue.

To anticipate a follow up, no there are no redirect rules in NGINX except for http → https, and www. → non-www. Those have been in place since day one.

I’d appreciate any suggestions. Thanks!