Hello! On Tue, Jun 18, 2019 at 03:12:12PM +0300, Gena Makhomed wrote:
> On 18.06.2019 14:09, Maxim Dounin wrote: > > > Проще всего сделать так: > > > > rewrite ^/wiki/(.*) https://$host/$1; > > в таком случае в редиректе возвращается раскодированный урл: > > $ curl -I https://example.com/wiki/%D1%82%D0%B5%D1%81%D1%82 > HTTP/1.1 301 Moved Permanently > Location: https://example.com/тест И снова эксперимент плохой, негодный. $ curl -vvv http://127.0.0.1:8080/wiki/%d1%82%d0%b5%d1%81%d1%82 * Trying 127.0.0.1... * TCP_NODELAY set * Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0) > GET /wiki/%d1%82%d0%b5%d1%81%d1%82 HTTP/1.1 > Host: 127.0.0.1:8080 > User-Agent: curl/7.62.0 > Accept: */* > < HTTP/1.1 302 Moved Temporarily < Server: nginx/1.17.1 < Date: Tue, 18 Jun 2019 12:24:39 GMT < Content-Type: text/html < Content-Length: 145 < Connection: keep-alive < Location: https://127.0.0.1/%D1%82%D0%B5%D1%81%D1%82 < <html> <head><title>302 Found</title></head> <body> <center><h1>302 Found</h1></center> <hr><center>nginx/1.17.1</center> </body> </html> * Connection #0 to host 127.0.0.1 left intact -- Maxim Dounin http://mdounin.ru/ _______________________________________________ nginx-ru mailing list nginx-ru@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-ru