Does anyone know how you would capture all the URL's that a url redirects to?
For example, let's say the url http://www.example.com/test
Redirects to:
http://www.example.com/test/1
http://www.example.com/test/1/?something=1
http://www.example.com/test/1/?another=1
I would want to print out all of the URL's above that were redirected to. I know in Curl you can follow redirects, but not sure you capture each one.
I
Getting all redirect URLs
Moderator: General Moderators
Re: Getting all redirect URLs
You can, with curl_getinfo and CURLINFO_REDIRECT_URL. Stick some code into a loop and you're set.
Re: Getting all redirect URLs
you can use php mod_rewrite
http://www.honoweb.net
http://www.sitepoint.com/article/guide-url-rewriting/
http://www.honoweb.net
http://www.sitepoint.com/article/guide-url-rewriting/