{"id":15593,"date":"2018-08-17T13:22:00","date_gmt":"2018-08-17T07:52:00","guid":{"rendered":"http:\/\/blog.taragana.com\/?p=15593"},"modified":"2018-08-17T13:22:00","modified_gmt":"2018-08-17T07:52:00","slug":"how-to-list-all-urls-in-redirect-chain","status":"publish","type":"post","link":"https:\/\/blog.taragana.com\/how-to-list-all-urls-in-redirect-chain-15593","title":{"rendered":"How to list all URL's in Redirect chain"},"content":{"rendered":"

This simple utility is extremely useful in detecting bad redirects and loops, specially in big websites. You can also include it in scripts.<\/p>\n

wget http:\/\/gmail.com 2>&1 | grep Location:<\/pre>\n

The response, in this case, is:<\/p>\n

Location: https:\/\/www.google.com\/gmail\/ [following]\nLocation: https:\/\/mail.google.com\/mail\/ [following]\nLocation: https:\/\/accounts.google.com\/ServiceLogin?service=mail&passive=true&rm=false&continue=https:\/\/mail.google.com\/mail\/&ss=1&scc=1&ltmpl=default&ltmplcache=2&emr=1&osid=1# [following]<\/pre>\n","protected":false},"excerpt":{"rendered":"

This simple utility is extremely useful in detecting bad redirects and loops, specially in big websites. You can also include it in scripts. wget http:\/\/gmail.com 2>&1 | grep Location: The response, in this case, is: Location: https:\/\/www.google.com\/gmail\/ [following] Location: https:\/\/mail.google.com\/mail\/ [following] Location: https:\/\/accounts.google.com\/ServiceLogin?service=mail&passive=true&rm=false&continue=https:\/\/mail.google.com\/mail\/&ss=1&scc=1&ltmpl=default&ltmplcache=2&emr=1&osid=1# [following]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[18,55],"_links":{"self":[{"href":"https:\/\/blog.taragana.com\/wp-json\/wp\/v2\/posts\/15593"}],"collection":[{"href":"https:\/\/blog.taragana.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.taragana.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.taragana.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.taragana.com\/wp-json\/wp\/v2\/comments?post=15593"}],"version-history":[{"count":0,"href":"https:\/\/blog.taragana.com\/wp-json\/wp\/v2\/posts\/15593\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.taragana.com\/wp-json\/wp\/v2\/media?parent=15593"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.taragana.com\/wp-json\/wp\/v2\/categories?post=15593"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.taragana.com\/wp-json\/wp\/v2\/tags?post=15593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}