【问题标题】:301 .htaccess redirects with two separate URLs301 .htaccess 使用两个单独的 URL 重定向
【发布时间】:2015-03-05 07:38:59
【问题描述】:

我想将 URL 重定向到两者

example.com/new-old.php

example.com/new-feb.php

当用户去

example.com/new

我该怎么做?

【问题讨论】:

  • 固定格式和澄清。

标签: .htaccess url redirect


【解决方案1】:

您可以在 root .htaccess 中使用此 301 规则:

RedirectMatch 301 ^/(new)-(old|feb)/?$ /$1

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-04-01
    • 2014-09-03
    • 2013-08-29
    • 1970-01-01
    • 2013-12-21
    • 2015-03-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多