Get rid of args from $request_uri

c0nw0nk nginx-forum at forum.nginx.org
Tue Aug 8 12:45:54 UTC 2017


why don't you use

$uri $is_args $args

This will build the URL like.

index.php ? arguement=value&moreargs=morevalue


$request_uri will always output the full URL. Not individual segments of
it.

If you want the first part of the url only just use $uri on its own.

http://nginx.org/en/docs/http/ngx_http_core_module.html#var_uri

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,275930,275936#msg-275936



More information about the nginx mailing list