原版的英文:

When the replacement URI contains a query string, the default behavior of RewriteRule is to discard the existing query string, and replace it with the newly generated one. Using the [QSA] flag causes the query strings to be combined.

Consider the following rule:

RewriteRule /pages/(.+) /page.php?page=$1 [QSA]

With the [QSA] flag, a request for /pages/123?one=two will be mapped to /page.php?page=123&one=two. Without the [QSA] flag, that same request will be mapped to/page.php?page=123 - that is, the existing query string will be discarded.

 

大意就是: 使用了[QSA]标记 /pages/123?one=two  会变成这样 /page.php?page=123&one=two

没有使用就只能这样,(就是说.?之后的不包括在(.*)里)/page.php?page=123

相关文章:

  • 2022-12-23
  • 2021-12-04
  • 2021-12-19
  • 2021-11-17
  • 2021-11-19
  • 2021-12-02
  • 2021-12-08
  • 2021-08-01
猜你喜欢
  • 2022-12-23
  • 2021-07-10
  • 2022-12-23
  • 2022-01-14
  • 2021-05-07
  • 2021-12-24
  • 2021-05-22
相关资源
相似解决方案