A question of URL rewrite

rayallenwu nginx-forum at nginx.us
Thu Dec 10 05:08:34 MSK 2009


Hi,

I hope to rewrite sin.jsp?code=111&x=2 to sin/111.htm
I tried the two ways below but it is still failed. Please help me out. Thanks very much!


rewrite  "^/sin.jsp?code=([0-9]+)&x=([0-9]+)$"     /sin/$1.htm last;

rewrite  "^/sin\.jsp\?code=([0-9]+)&x=([0-9]+)$"    /sin/$1.htm last;


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




More information about the nginx mailing list