For such a path '/~/...' the leading '/' is stripped so the server will get a path starting with '~' and correctly handle it.