Thanks! that works but would it be possible to execute something else in background after doing a return? So I need to execute something which does the redirect and then inserts some logs in the database... But only after redirect, so its a bit faster... Posted at Nginx Forum: http://forum.nginx.org/read.php?2,229436,229684#msg-229684