Hey,
I am trying to use cgilua.redirect but I am having some problems.
Depending on a variable value, I wanna redirect to A or to B.
if paper then
cgilua.redirect("papers/"..paper, { paper = file_name })
else
cgilua.redirect("no_paper.lp", { paper = file_name })
end
Unfortunately, it uses the current urlpath instead of substituting it.
So it is generating:
http://localhost:8080/index.lp/papers/xpto.lp?paper=xyz
instead of what I want
http://localhost:8080/papers/xpto.lp?paper=xyz
So I tried the code below and worked.
if artigo then
cgilua.urlpath = "artigos/"
cgilua.redirect(artigo, { paper = file_name })
else
cgilua.redirect("nao_achou.lp", { paper = file_name })
end
What am I doing wrong?
That's what I have to do?
How can I do it better?
Thanks,
Pablo
____________________________________________________________________________________
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com_______________________________________________
Kepler-Project mailing list
[email protected]
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/