我有这个重写规则
RewriteRule (.*)/([^/\.]+).css$ include/style/styleRedir.php?css=$2.css [L,NC]
与以下内容匹配:
某个文件夹/foo.css
并将它们重写为:
包括/样式/styleRedir.php?css=foo.css
但是它不匹配:
foo.css
所以我尝试将其更改为:
RewriteRule (.*)(/?)([^/\.]+).css$ include/style/styleRedir.php?css=$3.css [L,NC]
但随后它将重写为:
包括/样式/styleRedir.php?css=.css
那么我怎样才能制作这个 RewriteRule 以便它可以重写 foo.css 以包含/style/styleRedir.php?css=foo.css