<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=KOI8-R" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
On Fri, Feb 06, 2009 at 02:53:25PM -0500, Chris Sturgill wrote:<br>
<blockquote cite="mid:20090206195945.GB54616@rambler-co.ru" type="cite">
  <pre wrap="">
  </pre>
  <blockquote type="cite">
    <pre wrap="">I promise I've paid due diligence trying to solve this one through 
Google, but just can't come up with the solution (I've probably 
overlooked something very simple).

In Apache, I can forward a captured variable from a RewriteCond check 
like this:
RewriteCond %{QUERY_STRING} tag=(.*)
RewriteRule ^fastsearch(.*) /tags/%1? [L,R=301]

but I can't seem to find the nginx equivalent as the following doesn't work:
if ($query_string ~ "tag=(.*)") {
   rewrite ^/fastsearch.* /tags/%1? permanent;
}

My server admin is requiring that we run the stable version (0.6.35) so 
I can't use the $arg_PARAMETER introduced in 0.7.*.

What am I missing?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 if ($query_string ~ "tag=(.*)") {
    set  $tag  $1;
    rewrite ^/fastsearch.* /tags/$tag? permanent;
 }

  </pre>
</blockquote>
Thank you much!š I had tried putting $1 directly into the rewrite
without setting a separate variable, but got yelled at for not having a
matching term in the left-hand side of the rewrite equation.š This
simple answer just solved several days of frustration!<br>
</body>
</html>