Skip Location Based On Query String Parameter?

nrahl nginx-forum at
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:,254800,255950#msg-255950

More information about the nginx mailing list