thinkbot nginx-forum at
Mon Nov 30 01:42:53 MSK 2009

I've made it like

location = /rss.xml {
if ($args ~ ^type=popular&cid=([0-9]+)) {
rewrite ^ /cache/rss/popular_$1.xml break;

and get error: pattern "^" has less captures than referrenced in substitution "/cache/rss/popular_$1.xml"

I guess its about rewrite ^, so where should I place ([0-9]+) to get the number ?
I've tested with rewrite ^cid=([0-9]+) but doesn't work

I'm still learning nginx, but it's great web server

Thank you !

Posted at Nginx Forum:,26530,26594#msg-26594

More information about the nginx mailing list