args and rewrite vars always empty

User user24 at inbox.lv
Fri May 24 08:55:09 UTC 2019


On 5/24/19 8:41 AM, Patrick wrote:
> Use 'break' instead of 'last' as per
>
> https://nginx.org/en/docs/http/ngx_http_rewrite_module.html#rewrite

Unfortunately, it did not help. A small addition. Only try_files lose
$args, rewrite show args at error_logs with following request:

domain.com/product/android/?arg=test

But the problem that it does not fill $1 variable from (.*) ( $1 must be
"android"). But as seen at the logs, (.*) matches the url.

This rewrite now:  rewrite ^/pics/(.*)/$ /$1 break;

Always redirect to index page, because it never try to load "android"
file :(

Thanks




More information about the nginx mailing list