nginx rewrite help

Igor Sysoev igor at sysoev.ru
Wed Jun 9 21:39:00 MSD 2010


On Wed, Jun 09, 2010 at 10:32:21AM -0700, kevin wrote:

> hi
> how do i do this rewrite in nginx? can you help me out
> 
> id.quiz.xx.com -> quiz.xx.com/?quiz_id=id

    server {
        server_name  ~^(?<id>.+)\.quiz\.xx\.com$;
        rewrite      ^  http://quiz.xx.com/?quiz_id=$id;
    }


-- 
Igor Sysoev
http://sysoev.ru/en/



More information about the nginx mailing list