I disable my AMP plugin and i have two type AMP Pages and want to want to redirect them to orginal pages these pages with 301 redirect:
https://example.com/post-name/?amp=1
https://example.com/post-name/amp
to
I try this but it just redirect /amp and not redirect ?amp=1
RewriteEngine On
RewriteCond %{REQUEST_URI} (.+)/amp(.*)$
RewriteRule ^ %1/ [R=301,L]
i find it
RewriteCond %{THE_REQUEST} /?amp=1
RewriteRule ^(.+)$ /$1? [L,R]