Forum Moderators: phranque
I have developed a chat functionality in my site with jwchat as client and ejabberd as chat server. I have setup chat server in different IP and and site in other server. In chat, how it work is, when a request has come it redirect to chat server using .htaccess.
In .htaccess i have given as follows
AddDefaultCharset UTF-8
Options +MultiViews
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule http-bind/*. [000.000.0.000:5280...] [P]
</IfModule> But it is not redirecting to chat server. I have already setup mod_proxy and mod_balancer modules in Apche.
Anyone pls help me.
[edited by: engine at 11:08 am (utc) on Aug. 31, 2009]
[edit reason] IP obfuscated [/edit]
I tried as you told. But it is not working.
RewriteRule ^http-bind/(.*)$ [192.168.0.3:5280...] [P]
Thanks
It is working in my local machine with above configuration.
RewriteRule http-bind/*. [000.000.0.000:5280...] [P]
But it not working in live site. It shows service is unavailable.
Fact is that if I remove [P] from RewriteRule it will redirect to chat server.I have added
mod_proxy mod_proxy_balancer mod_proxy_ftp mod_proxy_http mod_proxy_connect in apache configuration.
"bind/*." means, "match 'bind' followed by any number of slashes (including zero) followed by at least one of any single character. It creates no back-reference, so "$1" as used in the substitution URL will be blank, and all requests for all chat page URLs will therefore be proxied to the root page on the chat server.
Jim
[edited by: jdMorgan at 12:13 pm (utc) on Sep. 2, 2009]