How to make a redirect via programming?

speedfirst nginx-forum at nginx.us
Thu May 26 03:14:59 MSD 2011


is this OK?

r->headers_out.status = NGX_HTTP_REDIRECT;
r->headers_out.content_length_n = 0;
... // the code set "Location" header

ngx_http_send_header(r);

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,200929,200937#msg-200937




More information about the nginx mailing list