My first rewrite QUERY_STRING

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

Any advice would be appreciated thanks

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,199820,199820#msg-199820

On Sun, May 22, 2011 at 12:35:07AM -0400, yaz wrote:

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 S.

thanks igor, this is working. I will read the doc for better
understanding of rewriting with nginx

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,199820,199832#msg-199832

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs