Need to proxy pass and rewrite the url

kamalakar v. lists at ruby-forum.com
Fri Jan 20 10:04:20 UTC 2012


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/.



More information about the nginx mailing list