Skip Location Based On Query String Parameter?

nrahl nginx-forum at nginx.us
Sun Jan 4 14:46:21 UTC 2015


I found soemthing that I think works, but it feels very hackish:

location ~ ^/([a-zA-Z0-9\-]+)/ {     
      error_page 418 = @apache; #proxy pass
      recursive_error_pages on;
      if ($arg_nc = 1) {
         return 418;
      }
      try_files /cache/$1.html @apache;
   }

Is this the best (only?) way to bypass a location based on query sting?

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



More information about the nginx mailing list