Problems with rewrite

jefersonph nginx-forum at nginx.us
Wed Jul 21 23:10:47 MSD 2010


I'm having problems with rewrite, I have to download the Apache server
for a current ngix but I'm finding some errors with rewrite

#NGINX
rewrite ^/http-bind/ http://www.xxx.com:1010/http-bind/ break;
rewrite ^/ws-chat/(.*)$ http://yyy.xxx.com/$1 break;

www.dominio.com/http-bind/  ->  http://www.xxx.com:1010/http-bind/
www.dominio.com/ws-chat/    ->  http://yyy.xxx.com/$1


Upon request it changes the field, he must not change as it is done in
the apache example below.
 

#APACHE
RewriteRule ^/http-bind/ http://www.xxx.com:1010/http-bind/ [P]   	    
RewriteRule ^/ws-chat/(.*)$ http://yyy.xxx.com/$1 [P,QSA]

www.dominio.com/http-bind/  ->  www.dominio.com/http-bind/
www.dominio.com/ws-chat/    ->  www.dominio.com/ws-chat/


thanks

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,111397,111397#msg-111397




More information about the nginx mailing list