%23 is the ASCII Hexidecimal equivalent to #.<br>See <a href="http://www.ascii.cl/htmlcodes.htm">http://www.ascii.cl/htmlcodes.htm</a> for the full list of codes.<br>John<br> <br clear="all">John Kennedy<br><br>
<br><br><div class="gmail_quote">On Wed, Dec 7, 2011 at 05:47, Ted Lemon <span dir="ltr"><<a href="mailto:mellon@fugue.com">mellon@fugue.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I've got a rewrite rule in my nginx config file to convert from an old URL to a new one, but the new URL has a hash string in it, and it doesn't seem to be possible to get nginx to rewrite that without encoding it.<br>
<br>
The relevant rewrite rule is this:<br>
<br>
location /contact/dmes/term {<br>
rewrite "/contact/dmes/term/(.*)" "/#term=$1";<br>
}<br>
<br>
This then goes through the following proxy:<br>
<br>
location / {<br>
proxy_pass_header Server;<br>
proxy_set_header Host $http_host;<br>
proxy_redirect off;<br>
proxy_set_header X-Real-IP $remote_addr;<br>
proxy_set_header X-Scheme $scheme;<br>
proxy_pass <a href="http://tornado" target="_blank">http://tornado</a>;<br>
}<br>
<br>
The URL that the proxied http server gets is this (as it appears in the log):<br>
<br>
WARNING:root:404 GET /%23term=14/ (127.0.0.1) 0.30ms<br>
<br>
Is there some way to disable this behavior? Have I violated some terrifying taboo? Thanks for any advice/flames!<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br>