ajax cross domain error on SAME domain?

Client of mine has a wordpress blog that we are ajaxing the rss feed to the homepage to display the past 3 posts… I’m using jquery and all was working perfect.

We changed our IP to a dedicated IP and all of a sudden it stopped working. my XHR is 0! I’m assuming it thinks it’s a cross domain issue.

Read More

For a temp fix I wrote a php proxy to load the file and I’m ajaxing that — (which works – note: file is in the wp dir so it’s not a dir wide issue)

thanks!

//EDIT (CODE)

$.ajax({
     url: '/blog/?feed=rss2',
     success: function() {
       alert('worked');
     },
    error: function(x){
        alert(x.status);
    }
});

$.ajax({
     url: '/blog/proxy.php',
     success: function() {
       alert('worked');
     },
    error: function(x){
        alert(x.status);
    }
});

Note: proxy.php just fopens “/blog/?feed=rss2”

I’m successful on proxy.php but getting jqXHR.status = 0

Related posts

Leave a Reply

1 comment

  1. Try checking some of these for more details. Definitely use Firebug or Chrome’s XHR debugger (F12)

    For backward compatibility with XMLHttpRequest, a jqXHR object will
    expose the following properties and methods:

    • readyState
    • status
    • statusText
    • responseXML and/or responseText when the
      underlying request responded with xml and/or text, respectively
    • setRequestHeader(name, value)
    • getAllResponseHeaders()
    • getResponseHeader()
    • abort()