One more thing, Is there a way to redirect from location rss.xml, to location / depends on the args ? location = /rss.xml { root /home/site/public_html; access_log off; expires 10m; if ($args ~ "^type=popular&cid=(\d+)") { set $cidby thinkbot - Nginx Mailing List - English
ohh just noticed post by Maxim Dounin, thank you !!!!!by thinkbot - Nginx Mailing List - English
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 doby thinkbot - Nginx Mailing List - English
Thank you Igor !!! One more thing, is there a way to put there regular expressions, something like location = /rss.xml { if ($args ~ ^type=popular&cid=([0-9]+) { rewrite ^ /cache/rss/popular_$1.xml break; } }by thinkbot - Nginx Mailing List - English
Hello, I wanted to rewrite this url rss.xml?type=popular&cid=8 to /cache/rss/popular_8.xml so I wrote location ~* \.(jpg|jpeg|gif|css|png|js|ico|xml)$ { root /home/site/public_html; access_log off; expires 30d; rewrite ^rss\.xml?type=popular&cid=(.*by thinkbot - Nginx Mailing List - English