【问题标题】:Redirect to /amp page重定向到 /amp 页面
【发布时间】:2019-03-23 23:59:13
【问题描述】:

当用户访问http://examle.com/review/amp/tes1/test2时,应该重定向到http://examle.com/review/amp

在 WordPress 重定向模块中,我在下面给出了正则表达式

来源/review/amp/(.*)$

目标/review/amp

但这会引发ERR_TOO_MANY_REDIRECTS 问题。

有什么办法可以解决这个问题

【问题讨论】:

  • 使用Source: /review/amp/(.+)$
  • @anubhava 这行得通。谢谢

标签: wordpress .htaccess redirect http-status-code-301 amp-html


【解决方案1】:

你在使用任何插件吗? 如果您能提供哪个插件,我可以让您知道该插件的功能。

但一般情况下,您也可以使用 .htaccess 并按照以下规则进行操作

RewriteRule ^review/amp/.+ review/amp [R=301,L]

【讨论】:

猜你喜欢
  • 2018-09-03
  • 1970-01-01
  • 2017-08-03
  • 2019-01-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-09-26
  • 1970-01-01
相关资源
最近更新 更多