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 $cid $1;
rewrite ^ /cache_sql/rss/popular_$cid.xml break;
}
if ($args ~ "^type=search") {
#redirect to location /
}
}
location / {
root /home/site/public_html;
access_log off;
proxy_pass http://localhost:8080;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}