Nginx forward proxy with # in the url
<p>So I am trying to forward a url that contains a # and am having some difficulty. I have the following in the location sections:</p>

<pre><code>  location ~* /.%23/evl {
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_pass https://foo.com;
    }

  location ~* /(?!.%23/evl) {
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_pass http://bar.com;
    } 
</code></pre>

<p>I would like everything with </p>

<p><a href="http://example.com/#/evl/" rel="nofollow">http://example.com/#/evl/</a>* to goto foo.com </p>

<p>everything else to bar.com</p>

<p>Any help would be appreciated.</p>