Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#35
改进后的默认 rewrite 规则最后增加了
(?:\.html?)?(\?|#|$).*
内容,说明如下:(?:\.html?)?
:非捕获组,它匹配.html
或.htm
,这个组后面的?
表示这个组是可选的,也就是说,它可以出现 0 次或 1 次。(\?|#|$)
:捕获组,它匹配?
或#
或结束符号$
,这个组表示 URL 中参数的开始位置。.*
:标识匹配 0 个或多个任意字符,也就是 URL 中参数的内容。