i used an amp plugin earlier but then I disabled it. Now variations of leftover amp path leave me with a thousand of "not found" or extra additional URLs with amp parameters.
https://www.example.com/post.html?amp
https://www.example.com/post.html?amp=0
https://www.example.com/post.html?amp=1
https://www.example.com/post.html?noamp
https://www.example.com/post.html?noamp=0
https://www.example.com/post.html?noamp=1
https://www.example.com/post.html/amp/
https://www.example.com/post.html/amp
Post permalinks is set as /%postname%.html
,so post URL is something like this
https://www.example.com/post.html
htaccess is using auto-generated one by wordpress
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Any suggestion on how to handle these URL variations? I'm unsure what to do. I'm thinking to redirect 301 to its permalinks (maybe using htaccess or plugin redirection such as rankmath.) But I'm clueless on how to used regex, maybe someone can share piece of htaccess rule or Rankmath regex rules.
/amp/
/amp
..you're correct?amp=
and?param
did not cause 404 error but/amp/
does..there're created by amp plugin..my apologize if I'm confused you.html
extension present on all these URLs and part of your permalink structure?