Cannot redirect to AMP pages based on ?amp query paramteter

I am setting up a website on Netlify, and want to have an AMP version of the blog.

I am generating the amp pages separately, with a pre-build script to /amp-pages/:lang/:slug.html

What I want to achieve:

Redirect a regular blog article, like:


after adding the query param ?amp to the original url, like this:

The contents of my _redirects file are the following:

# main page redirects
/ /de-ch

# amp redirects
/:lang/blog/:slug amp /amp-pages/:lang/:slug.html 301

# 404 redirects
/de-ch/* /de-ch/error 404
/en-ch/* /en-ch/error 404
/fr-ch/* /fr-ch/error 404

However, when adding the ?amp parameter, nothing happens. What am I doing wrong, and how can I achieve what I want?

PS.: The url in the examples above is my actual Netlify url (

Thanks in advance!