Welcome! Log In Create A New Profile

Advanced

Re: Rewrite

November 30, 2009 08:52AM
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;
}
Subject Author Posted

Rewrite

thinkbot November 29, 2009 01:21PM

Re: Rewrite

Igor Sysoev November 29, 2009 03:34PM

Re: Rewrite

thinkbot November 29, 2009 03:53PM

Re: Rewrite

thinkbot November 29, 2009 05:42PM

Re: Rewrite

thinkbot November 29, 2009 05:43PM

Re: Rewrite

thinkbot November 30, 2009 08:52AM

Re: Rewrite

Igor Sysoev November 29, 2009 04:04PM

Re: Rewrite

Maxim Dounin November 29, 2009 05:08PM

Re: Rewrite

Maxim Dounin January 11, 2017 08:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 90
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready