wordpressapache.htaccesshttp-redirectamp-html

Apache or WordPress plugin that redirects /?amp=1 to normal url


I am looking for a way to properly redirect /?amp=1 urls to normal urls as I have removed amp from my website. I run apache so a .htaccess solution or a WordPress plugin that can handle /?amp=1 redirects would be welcome ;-)


Solution

  • You can use this to remove the /?amp=1 from your URLs.

    RewriteEngine On
    
    RewriteCond %{THE_REQUEST} /\?amp=1
    RewriteRule ^(.+)$ /$1? [L,R]