title: AJAX: problem with redirect
body: <p>This is the first time ever I'm using AJAX, and I want to do the following on an otherwise static page www.xyz.org/some_site.html:</p>
  
  <ul>
  <li>Send a GET request to another url <code>"www.xyz.org/testscript"</code></li>
  <li>if response has either <code>status code != 200</code> or <code>content != 'ok'</code>: do nothing</li>
  <li>else: include sth on the website (i.e. set <code>style="display:block"</code> on an element that previously had <code>"display:none"</code>)</li>
  </ul>
  
  <p>I've implemented that successfully using basic AJAX. But:</p>
  
  <p>There is an Apache redirect installed pointing from <code>www.xyz.org/testscript</code> to <code>subdomain.xyz.org/testscript</code>, the URL where the actual testscript lives (as AJAX doesn't support cross-domain calls even to subdomains afaik).</p>
  
  <p>When I call www.xyz.org/testscript I get a <code>302</code> status code, and the content says "The document has moved here: subdomain.xyz.org/testscript". </p>
  
  <p>How can I grab the 'final' return value?</p>
  
  <p>I guess/hope any AJAX expert can give me a one-liner to solve that ... </p>