[ejabberd] ejabberd_web redirect

Oleg V. Motienko mmm at ttn.ru
Thu Aug 5 18:30:37 MSD 2004


Hello!

A small patch to ejabberd_web, which make http redirect on / page.
(So, we use different servers for ejabberd and www page of jabber service)

--- ejabberd_web.erl.orig    Sat May 22 23:48:34 2004
+++ ejabberd_web.erl    Thu Aug  5 18:21:50 2004
@@ -77,6 +77,16 @@
              lang = Lang} = Request) ->
     ejabberd_http_poll:process_request(Request#request{path = RPath});
 
+
+process_get({true, _},
+        #request{path = ""} = Request) ->
+        {302,
+         [{"Location", "http://www.jabber.domain.ru/"}],
+         ejabberd_web:make_xhtml([{xmlelement, "p", [],
+                       [{xmlcdata, "The document has moved"}]}])};
+   
+
+
 process_get(_, _Request) ->
     {404, [], make_xhtml([?XC("h1", "Not found")])}.
 
-- 
Regards, Oleg
xmpp: mmm at jabber.ttn.ru



More information about the ejabberd mailing list