trouble with location regex and redirection in nginx

view full story

http://serverfault.com – I want to setup proxy in nginx: location ~ ^/m/([^/]*)/([^/]*)/([^/]*)$ { proxy_pass$1/$2/$3; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } It works but this address http:// myhost/m/test//ss gets translated to http://; How can I get my second slash?? Thanx. (HowTos)