Update webPagePost to handle error redirection

Update webPagePost to handle error redirection