更新时间:2023-11-26 17:58:58
对于Apache 2.2(不确定以前的版本),您可以使用正负表达式来匹配正则表达式,以匹配除/assets
像这样:
With Apache 2.2 (not sure about previous versions), you can use a regular expression with a negative lookahead to match all root location URL-path directories other than /assets
like so:
<LocationMatch "^(?!/assets)/[^/]+">
...
</LocationMatch>
请注意,这不包括根URL路径/
本身.
Note that this does not include the root URL-path /
itself.