我需要在Nginx中转换这些.htaccess规则,但是当我尝试定位文件名及其扩展名时,Nginx与它不匹配。我真的不明白为什么这种行为。
RewriteRule ^(.*?)(test_mod_rewrite) /$1media/plg_jchoptimize/assets/modrewrite.php?q=$2
RewriteRule ^(.*?)(gz|nz)/([^/]+)/([^/]+)/([^/]+)\.(js|css)$ /$1media/plg_jchoptimize/assets/jscss.php?f=$5&type=$6&gz=$2&d=$3&i=$4
我在Nginx中转换了这些规则:
location /media/plg_jchoptimize/assets/ {
rewrite ^/(test_mod_rewrite) /media/plg_jchoptimize/assets/modrewrite.php?q=$1;
rewrite ^/(gz|nz)/([^/]+)/([^/]+)/([^/]+)\.(js|css)$ /$1media/plg_jchoptimize/assets/jscss.php?f=$4&type=$5&gz=$1&d=$2&i=$3;
}
示例网址为:
/media/plg_jchoptimize/assets/gz/30/0/d8604b25d503f1dcbb035ec731857648.css
我错了什么?