Welcome! Log In Create A New Profile

Advanced

Re: Why is # rewritten to %23?

John Kennedy
December 07, 2011 05:16AM
%23 is the ASCII Hexidecimal equivalent to #.
See http://www.ascii.cl/htmlcodes.htm for the full list of codes.
John

John Kennedy



On Wed, Dec 7, 2011 at 05:47, Ted Lemon <mellon@fugue.com> wrote:

> 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.
>
> The relevant rewrite rule is this:
>
> location /contact/dmes/term {
> rewrite "/contact/dmes/term/(.*)" "/#term=$1";
> }
>
> This then goes through the following proxy:
>
> location / {
> proxy_pass_header Server;
> proxy_set_header Host $http_host;
> proxy_redirect off;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Scheme $scheme;
> proxy_pass http://tornado;
> }
>
> The URL that the proxied http server gets is this (as it appears in the
> log):
>
> WARNING:root:404 GET /%23term=14/ (127.0.0.1) 0.30ms
>
> Is there some way to disable this behavior? Have I violated some
> terrifying taboo? Thanks for any advice/flames!
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Why is # rewritten to %23?

Ted Lemon December 07, 2011 12:48AM

Re: Why is # rewritten to %23?

John Kennedy December 07, 2011 05:16AM

Re: Why is # rewritten to %23?

Ted Lemon December 07, 2011 09:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 143
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready