fix redirection issues by adding context to redirection url build