Beginner question:Nginx request_uri meaning ?

Bike dernikov1 dernikov1 at gmail.com
Wed Jan 11 16:18:26 UTC 2017


Hi, i have "simple" question, need simple explanation. It's driving me
nuts.

In nginx configuration what is meaning of  $request_uri in line?

*********************************************************
return 301 $scheme://example.com1$request_uri;
***********************************************************
In documentation  write: $request_uri is full  request URI.
I will try to describe my doubth.

Simple request URL: http://www.example.com/index.html

Full request URI is the same: http://example.com/index.html

$request_uri=http://example.com/index.html.

As i understand then line:

 return 301 $scheme://example1.com$request_uri;

must return:

http://example1.comhttp://example.com/index.html.

But that  cannot be correct.

So what mean var $request_uri ? Is defined wrong in documentation. (or URI
is not what i described ?) or it mean something different, or it mean
something different in combination with return ??
Thanks for help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20170111/15e321b8/attachment-0001.html>


More information about the nginx mailing list