【问题标题】:QUERY_STRING with parameterQUERY_STRING 带参数
【发布时间】:2013-08-22 06:29:27
【问题描述】:

假设我有这样的查询字符串参数的 URL:

/index.php?test=MYID

使用 mod_rewrite,我怎样才能将它们重定向到像这样的 SES URL?

/index.php?view=MYID

【问题讨论】:

    标签: .htaccess parameters rewrite query-string url-parameters


    【解决方案1】:

    试试:

    RewriteEngine On
    RewriteCond %{QUERY_STRING} ^test=(.*)$
    RewriteRule ^index\.php$ /index.php?view=%1 [L,R=301]
    

    【讨论】:

      猜你喜欢
      • 2013-11-17
      • 1970-01-01
      • 2017-10-07
      • 2020-07-31
      • 2019-11-09
      • 1970-01-01
      • 1970-01-01
      • 2022-01-04
      • 1970-01-01
      相关资源
      最近更新 更多