I'm using nginx for an API et my rewriting is in the Vhost and I have an issue with a regex.
My url can be :
- /products/BR3TMVZ9PNWZ/
- /products/BR3TMVZ9PNWZ%BPMMFJDVP9NF/
- /products/BR3TMVZ9PNWZ%BPMMFJDVP9NF%BPNSJSZCRPPF/
The first one works with this :
rewrite /products/([A-Z0-9]+)/ /products.php?ids=$1 last;
I tried a lot of thing with % but I already have a HTTP 400
Thank you
Edit :
rewrite "^/products/([A-Z0-9]+)\%{0,1}.*$" /products.php?ids=$1 last;
Should always match the first id
BR3TMVZ9PNWZ