Welcome! Log In Create A New Profile

Advanced

Re: Nginx Rewrite

Francis Daly
February 05, 2015 01:18PM
On Thu, Feb 05, 2015 at 12:16:27PM -0500, ntamblyn wrote:

Hi there,

> How can i turn this into a rewrite i have include what i have tried

"rewrite" matches a request uri, the same as "location" does. This does
not include the query string.

> I have tried
>
> rewrite /test/c_(.*)\?change_lang /test/e_$1 redirect;
>
> but that doesnt work

If "rewrite" is the right tool, a way to use it here is

if ($args = "change_lang") {
rewrite ^/test/c_(.*) /test/e_$1? redirect;
}

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx Rewrite

ntamblyn February 05, 2015 12:16PM

Re: Nginx Rewrite

B.R. February 05, 2015 01:14PM

Re: Nginx Rewrite

Francis Daly February 05, 2015 01:18PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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