Add controller prefix and improve url redirect after page generation