我正在寻找一种方法来正确重定向/?amp=1URL转换为正常URL,因为我已经从网站上删除了amp。我运行apache,所以.htaccess解决方案或WordPress插件可以处理/?amp=1重定向将是受欢迎的;-(
您可以使用它从URL中删除/?amp=1
。
RewriteEngine On
RewriteCond %{THE_REQUEST} /?amp=1
RewriteRule ^(.+)$ /$1? [L,R]