|
I am parsing a certain URL and want to step through all of the URL history. Basically the initial URL redirects me to another URL, which redirects to yet another URL, maybe 2. I want to know which url's it steps through as it attempts to redirect to the final destination.
Right now, my solution is to set the max_redirect variable in _mech to some integer, call the get() method, and then check the uri and/or base() values. Then increase the value for max_redirect by 1 and repeat, until the base() and/or uri match the intended final url. It seems like there should be a simpler method.
Any ideas?
Thanks,
Dustin
|