// 302 = "Moved temporarily" static NanoHTTPD.Response serveRedirect(S url) { NanoHTTPD.IStatus status = new NanoHTTPD.IStatus() { public String getDescription() { ret "302 Moved temporarily"; } public int getRequestStatus() { ret 302; } }; NanoHTTPD.Response r = NanoHTTPD.newFixedLengthResponse( status, NanoHTTPD.MIME_PLAINTEXT, ""); r.addHeader("Location", url); ret r; }