How to get a redirection response
<p>How to get the response (which is a redirect instruction) of a request from server side?
For example if I put www.abc.com in the browser the browser automatically gets redirected to www.xyz.com.
Now I need to get that redirect url from server side. i.e. need send a request to www.abc.com in response it returns a redirect url www.xyz.com, need to store this xyz.com.
Any Idea how this can be done?</p>
