Hello.
Trying to set up a redirect to the home page if the wrong request in the address bar.
The code is as follows.
location / {
try_files $uri $uri/ /;
}
In principle it works as it should, but it is annoying that the address bar is left with a string of incorrect requests. For example, when typing
http:/some.orgthere_is_no_resource , the code redirects to the right place, but the address line stays as requested. How can I tell nginx to remove erroneous $uri from the address bar?