title: Prevent redirection using url
body: <p>I have an application written in Java Struts 2. We detected an open redirect vulnerability. </p>
  
  <p>Open redirect occurs when a web page is being redirected to another URL in another domain via a user-controlled input.</p>
  
  <p>For example: 
  when we try URL like <code>myapp.abc.com/test.action?redirect:google.com/?</code>, it redirects to <code>google.com</code>. </p>
  
  <p>I need to prevent this for security concerns. It should not redirect to any other domain except our domain. How do I prevent this type of attack?</p>