Welcome! Log In Create A New Profile

Advanced

Re: encode url

January 18, 2011 02:52AM
Hi,

I really need the same for rewrite and variables like $http_referer or $request_uri.

There were several questions regarding that in the past, but I can't find a solution.

An example:
[code]
# url rewriting
location ~ \.htm$ {
rewrite ^/([a-z0-9_]+)\.htm$ /$1.php?uri=$request_uri break;
proxy_next_upstream error timeout http_500 http_503 http_404 invalid_header;
proxy_pass http://backend;
}
[/code]

In some rules $request_uri contains arguments with ampersand and as it isn't escaped, those won't be part of the "uri"-var.

I really like to have a function like url_encode() or something similar to str_replace().

regards,
Marc
Subject Author Posted

encode url

pattryn November 26, 2010 04:51AM

Re: encode url

mgutt January 18, 2011 02:52AM

Re: encode url

mgutt January 24, 2011 04:07AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 309
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