take into account form action when redirecting