It's out of the ServerXMLHTTP capabilities.
Instead you have to use IWinHttpRequest or another third-party component that able to manage redirects.
In the following example, req.Option(WHR_URL)
returns the current url even if redirected.
Option req.option(WHR_EnableRedirects)
is True
by default like ServerXMLHTTP.
So, I've added a line commented out showing how to disable redirects.
Const WHR_URL = 1
Const WHR_EnableRedirects = 6
'Enum constants are listed at http://msdn.microsoft.com/en-us/library/windows/desktop/aa384108(v=vs.85).aspx
Dim req
Set req = Server.CreateObject("WinHttp.WinHttpRequest.5.1")
'req.Option(WHR_EnableRedirects) = False 'don't follow the redirects
req.open "GET", "http://www.foo.com", False
req.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
req.send PostData
If req.Status = 200 Then
Response.Write "Last URL : " & req.Option(WHR_URL)
End If