Welcome! Log In Create A New Profile

Advanced

Proxy_pass and rewrite

Rodrigo Serra Inacio
August 09, 2013 02:02PM
Hi, I'm try to do a proxy_pass and rewrite rules like this:

location /directory/ {
proxy_pass http://some_url_to_proxy_pass/;
expires +10d;
}

It's working, but I need to repeat the /directory/ on the new url to work
....like this
http://testurl.com/directory/directory/foo/bar/

And I want just one /directory/foo/bar/...then a try a rewrite rule, like
this

location /directory/ {
proxy_pass http://some_url_to_proxy_pass/;
rewrite /directory/(.*) $1 break;
expires +10d;
}

But, isn't work
Some help, please.
Thanks
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Proxy_pass and rewrite

Rodrigo Serra Inacio August 09, 2013 02:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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