[erlang-questions] misultin forward req

Wes James comptekki@REDACTED
Tue Nov 29 18:50:43 CET 2011


On Tue, Nov 29, 2011 at 10:31 AM, Wes James <comptekki@REDACTED> wrote:
> Anyone know with misultin if there is a way to forward a request.
> I.e., if I have some settings in a conf file for a a login page
> {on/off}.  If it is on, it will show the login page - I can do that,
> but if I have login page {off} and someone goes to /login I want it to
> go to /, but if I just use handle('GET', [], Req, Port) in the true
> part of the case the / page shows, but the url has /login of course
> since that was the original request.


I realize now I can just do:

Req:ok([{"Content-Type", "text/html"}],["<meta HTTP-EQUIV='REFRESH'
content='0; url=/'">])

Thanks,

-wes



More information about the erlang-questions mailing list