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

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -