regex - How do I convert B option in htaccess to Nginx? -
how convert rewrite htaccess_nginx
rewriterule ^(.*\.jpg)(\?.*)?$ test.php?path=$1 [b,l]
my problem when open path "localhost/shop/a&b.jpg" show value.
(size=2) 'path' => string '/a' (length=33) 'b_jpg' => string '' (length=0)
but want
array (size=1) 'path' => string 'a&b.jpg' (length=40)
i try use
but not correct because
rewriterule ^(.*\.jpg)(\?.*)?$ test.php?path=$1 [b,l] rewriterule ^(.*\.jpg)(\?.*)?$ test.php?path=$1 [qsa,l]
it gives same results:
rewrite ^/(.*\.jpg)(\?.*)?$ /test.php?path=$1 break; rewrite ^/(.*\.jpg)(\?.*)?$ /test.php?path=$1 break;
Comments
Post a Comment