.htaccess - Nginx rewrite doesn't work when I try to match a file -
i need convert in nginx these .htaccess rules, when try target filename , extensions, nginx doesn't match it. don't understand why of behavior.
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
i converted these rules in 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; }
the example url is:
/media/plg_jchoptimize/assets/gz/30/0/d8604b25d503f1dcbb035ec731857648.css
what i'm wrong?
Comments
Post a Comment