title: matching substring in nginx location
body: <p>I am using nginx 1.4.3 and trying to match long string or substring in long url like this:</p>
  
  <ol>
  <li><p>Long url without any regexes</p>
  
  <pre><code>location ~* /index.php?/english/Kbase/Article/IRS {
              proxy_pass         http://backend;
              proxy_cache        kbase-cache;
              &lt;...&gt;
  }
  </code></pre>
  
  <p>Result: nothing is matched, but such url exists.</p></li>
  <li><p>Long url with regexes</p>
  
  <pre><code>location ~* /idx/index.php?/Kbase/branch/Article/\d+.*  {
              proxy_pass         http://backend;
              &lt;....&gt;
  }
  </code></pre>
  
  <p>Result: nothing is matched</p></li>
  <li><p>.</p>
  
  <pre><code>location ~* /idx/index.php?/Tickets/Ticket/ListAll/[\d,]*/6/[\d,]*/[\d,]*.*   {
              proxy_pass         http://backend;
              &lt;....&gt;
  }
  </code></pre>
  
  <p>Result: nothing is matched</p></li>
  <li><p>.</p>
  
  <pre><code>location ~* \.(jpg|jpeg|gif|png)$ {
              root /opt/httpdocs;            
  }
  </code></pre>
  
  <p>Result: works fine.</p></li>
  <li><p>.</p>
  
  <pre><code>location / {
              proxy_pass         http://backend;
  }
  </code></pre>
  
  <p>Result: works fine.</p></li>
  </ol>
  
  <p>Examples 1,2,3: I tried all variations to match at least substring .<em>Article.</em>, 
  and it doesn't work, even .*IRS doesn't work, but 4th example works fine. </p>
  
  <p>Am I missing something or what? Please advise.
  </p>