I found the solution here: http://shareapointkiran.blogspot.com.es/2011/12/infopath-form-redirect-to-any-page-once.html
1. Add a content editor with the following Javascript to your page with the Form WebPart.
I've refined the JavaScript a bit from the original solution:
<script type="text/javascript"> function ClosedFormRedirect() { var dialogMessageElement = document.getElementById("DialogFinalMessage"); if(dialogMessageElement != null && dialogMessageElement.children.length > 0) { var sourceURL = GetUrlKeyValue('source', false); window.location.href = sourceURL; } } _spBodyOnLoadFunctionNames.push("ClosedFormRedirect"); </script>