1

Nginx rewrite with query-string without if

view story
linux-howto

http://serverfault.com – I have multiple apache rewrite with different Query_String to convert to nginx: ServerName oldsite.com RewriteCond %{QUERY_STRING} ^ubb=showflat&Number=662213$ RewriteRule ^/ubbthreads/ubbthreads.php$ http://newsite.com/1/? [R=301,NC,L] RewriteCond %{QUERY_STRING} ^ubb=showflat&Number=662214$ RewriteRule ^/ubbthreads/ubbthreads.php$ http://newsite.com/2/? [R=301,NC,L] --> server { listen 80; server_name oldsite.com; location ~ /ubbthreads/{ if ($arg = "ubb=showflat&Number=662213"{ rewrite ^ubbthreads/ubbthreads.php http://newsite.com/1 (HowTos)