You can use curl to read http headers section of url - there is information about redirects, location of redirect etc. You will just need to parse headers and check if there are redirects and what is destination location. I’ll create a small php script and post it here later.
Also, if you are on Linux, you can run curl in command line to trace sequence of redirects. Here is an example of such command:
curl -I -L http://www.phphelp.com/forums/
And here is the output for the command above:
$ curl -I -L http://www.phphelp.com/forums/
HTTP/1.1 301 Moved Permanently
Date: Tue, 16 Nov 2010 21:52:37 GMT
Server: Apache/2.2.3 (CentOS)
Location: http://www.phphelp.com/forum/
Vary: Accept-Encoding
Connection: close
Content-Type: text/html; charset=iso-8859-1