'AWS Amplify ignoring query string

I am running a React app on AWS amplify and when the password link (with query string) is clicked from the email in the format of https://www.domain.co.uk/[email protected]&token=5p0-2ce1c23665f782e62cw69

it is just returned back to the homepage. I suspect it is something to do with the second rule. If I access this directly into the URL browser, it works: https://www.domain.co.uk/[email protected]&token=5p0-2ce1c23665f782e62cw69

[
    {
        "source": "https://domain.co.uk",
        "target": "https://www.domain.co.uk",
        "status": "302",
        "condition": null
    },

    {
        "source": "/<*>",
        "target": "/index.html",
        "status": "404-200",
        "condition": null
    },
    {
        "source": "</^[^.]+$|\\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|ttf|map|json)$)([^.]+$)/>",
        "target": "/index.html",
        "status": "200",
        "condition": null
    }
]

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source