My first rewrite QUERY_STRING

Igor Sysoev igor at sysoev.ru
Sun May 22 09:24:04 MSD 2011


On Sun, May 22, 2011 at 12:35:07AM -0400, yaz wrote:
> Hello 
> 
> here is a piece of htaccess i am stuck converting into nginx rewrite
> conventions : 
> 
> RewriteCond %{QUERY_STRING} ^sms_ss= [OR]
> RewriteCond %{QUERY_STRING} ^scvds=
> RewriteRule ^(.*)$ http://www.mysite.com/$1? [R=301,L]
> 
> 
> I am trying something like 
> 
>  if ($args ~ "sms_ss= (.*)") {
>         rewrite ^ /(.*)=$args? break;
>     }
> 
> Not working 

   if ($arg_ss) {
       rewrite  ^  $uri?  permanent;;
   }

   if ($arg_scvds) {
       rewrite  ^  $uri?  permanent;;
   }


-- 
Igor Sysoev



More information about the nginx mailing list