nginx rewrite

Igor Sysoev is at rambler-co.ru
Tue Feb 17 22:20:19 MSK 2009


On Tue, Feb 17, 2009 at 11:59:17AM -0700, Paul Greenwood wrote:

> I'm sorry I am new to nginx but what does value $args hold and where does
> the value come from?

$args is the same as $query_string.

> On Mon, Feb 16, 2009 at 1:50 AM, Igor Sysoev <is at rambler-co.ru> wrote:
> 
> > On Sun, Feb 15, 2009 at 01:52:19PM -0700, Paul Greenwood wrote:
> >
> > > How would you use regx in nginx for this:
> > >
> > > RewriteCond %{QUERY_STRING} ^$ [OR] %{REQUEST_URI} ^/Special:Search
> > > RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA,NE]
> > >
> > > I'm not sure to how to do this?
> >
> >    location / {
> >       if ($args = "") {
> >           rewrite  ^  /index.php?title=$request_uri?   last;
> >       }
> >   }
> >
> >   location /Special:Search {
> >       rewrite  ^  /index.php?title=$request_uri?;
> >   }


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list