Welcome! Log In Create A New Profile

Advanced

Need to proxy pass and rewrite the url

kamalakar v.
January 20, 2012 05:06AM
my conf :

location / {
proxy_pass http://mydomain.com;
proxy_redirect off;
proxy_set_header Host $host;
}

location ~*/redirect {
proxy_pass http://some.domain.com/cp/$1;
}


* http://mydomain.com/12121/redirect -->>
http://some.domain.com/cp/redirect

* if the url contains redirect then i should rewrite the url ( need to
change the domain and append 'cp' to the url

But with above config not working giving me following error page
"The page you are looking for is temporarily unavailable. Please try
again later."


Referred the below thread:
http://www.ruby-forum.com/topic/144179
This almost clear my problem but need to append cp to the url?

--
Posted via http://www.ruby-forum.com/.

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

Need to proxy pass and rewrite the url

kamalakar v. January 20, 2012 05:06AM

Re: Need to proxy pass and rewrite the url

António P. P. Almeida January 20, 2012 09:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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