1.需求:

需要把

www.amwuqd.com/view.action?postId=31276708&sourceFlag=false&client=key:FirstTimeForiPhone

跳转到 

http://hj.amwuqd.com/topic/single.shtml?dashboard_id=31276708

id 随参数变化。

2.

解决:

        if ($query_string ~ 'postId=([0-9]+).*FirstTimeFor' ) {
                set $board_id $1;
            rewrite /view.action  http://hj.amwuqd.com/topic/single.shtml?dashboard_id=$board_id? permanent;
        }




参考地址:http://blog.sina.com.cn/s/blog_64e2219d01018lbr.html

http://blog.csdn.net/cnbird2008/article/details/4409620