Welcome! Log In Create A New Profile

Advanced

Re: replace string on proxy request

April 19, 2010 01:24PM
On Mon, Apr 19, 2010 at 12:55:10PM -0400, Alberto wrote:

> We are using nginx as a reverse proxy, and we want to modify some strings on the body response.
>
> The problem is this one:
>
> http://www.doman.com -> proxied to -> http://192.168.0.0/
>
> We get into the body response links like: http://192.168.0.0/0.gif.
>
> How can we replace 192.168.0.0 by domain.com?

You may replace single string using

sub_filter http://192.168.0.0 http://www.domain.com;

However, it's better to configure backend to use "www.domain.com".


--
Igor Sysoev
http://sysoev.ru/en/

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

replace string on proxy request

Alberto April 19, 2010 12:55PM

Re: replace string on proxy request

Igor Sysoev April 19, 2010 01:24PM

Re: replace string on proxy request

Igor Sysoev April 19, 2010 01:24PM

Re: replace string on proxy request

Weibin Yao April 19, 2010 10:24PM

Re: replace string on proxy request

Alberto April 20, 2010 06:59AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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