how can I return to the previous page in twig? In twig you can access: app.request.headers.get('referer') Hope this help