Match Question Mark in mod_rewrite rule regex

前端 未结 3 679
一整个雨季
一整个雨季 2020-11-30 06:25

I am looking to rewrite urls with multiple substrings. One substring is being requested as a subdirectory, while any others are requested as normal query string parameters.

3条回答
  •  隐瞒了意图╮
    2020-11-30 07:23

    The query is not part of the URL path and thus cannot be processed with the RewriteRule directive. This can only be done with the RewriteCond directive (see %{QUERY_STRING}).

    But as Chad Birch already said it suffices th set the QSA flag to automatically get the original requested query appended to the new URL.

提交回复
热议问题