【问题标题】:301 redirect or URL redirection in htaccess filehtaccess 文件中的 301 重定向或 URL 重定向
【发布时间】:2016-11-21 05:15:26
【问题描述】:

我想将查询字符串 URL 重定向到 .htaccess 文件中我自己的 URL。我没有找到任何解决方案,请帮助我解决这个问题。我想用查询字符串https://example.com/?p=3842 将我的URL 重定向到https://example.com/,就像我想重定向它一样。任何帮助,将不胜感激 。提前致谢!

【问题讨论】:

    标签: .htaccess redirect url-redirection


    【解决方案1】:

    有很多使用查询字符串匹配的例子。

    RewriteEngine on
    RewriteCond %{QUERY_STRING} p=3842
    RewriteRule ^ /? [R=301,L]
    

    请务必让我知道这对您有什么作用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-12-21
      • 2015-03-04
      • 1970-01-01
      • 1970-01-01
      • 2016-09-28
      • 2023-03-25
      • 2013-01-27
      • 1970-01-01
      相关资源
      最近更新 更多