title: Get content of a webpage which is redirected to another webpage
body: <p>I want to crawl the content of the webpage - <a href="http://www.pgmfi.org/" rel="nofollow noreferrer">http://www.pgmfi.org/</a>. But if we visit the page, we will see it redirects to the page - <a href="http://twiki.pgmfi.org/bin/view" rel="nofollow noreferrer">http://twiki.pgmfi.org/bin/view</a>.</p>
  
  <p>When I tried to crawl the content from the URL (<a href="http://www.pgmfi.org/" rel="nofollow noreferrer">http://www.pgmfi.org/</a>) using <code>jsoup</code> or <code>crawler4j</code>, I got the following content.</p>
  
  <pre><code>Looking for PGMFI.ORG Home ? Please wait redirecting to: http://twiki.pgmfi.org
  </code></pre>
  
  <p>But I want to get more information about the webpage from that redirected webpage (<a href="http://twiki.pgmfi.org/bin/view" rel="nofollow noreferrer">http://twiki.pgmfi.org/bin/view</a>). When I run a simple code using <code>jsoup</code>, I found the following.</p>
  
  <pre><code>String url = "http://www.pgmfi.org/";
  
  Response response = Jsoup.connect(url).followRedirects(false).execute();
  System.out.println(response.statusCode() + " : " + response.url());
  
  //check if URL is redirect?
  System.out.println("Is URL going to redirect : " + response.hasHeader("location"));
  System.out.println("Target : " + response.header("location"));
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>200 : http://www.pgmfi.org/
  Is URL going to redirect : false
  Target : null
  </code></pre>
  
  <p>So, the redirection is obviously not straight-forward. My question - is there any way, I can get the url to which the page is redirecting without parsing the html body? </p>
  
  <p>I prefer a solution using <code>crawler4j</code>. Even a solution in <code>jsoup</code> is fine for me.</p>