jQuery AJAX call fails on same origin domain
I'm doing a JSONP query of a Wordpress database. Example call:
- $.getJSON("http://www.bettervallejo.org/?json=1&cat=5&include=url,attachments&callback=?",{},
- function(jfeed)
- { ... }
This code returns the expected data when executed on my local server. It also returns the expected data when I upload it to one of my remote servers. But it fails when run from the root of the domain it's calling, www.bettervallejo.org — no data is returned. (Behavior is the same for latest versions of Firefox, Safari, Chrome.)
I think there's something really simple going wrong here but don't know what it is. The only clue I have is provided by Firefox: When run successfully, all of the GET's appear in the JS subpanel of NET. The failed calls, launched from the domain containing the database, are listed in the XHR subpanel with a status of "301 Moved Permanently".
Any suggestions on how to troubleshoot would be much appreciated!
- Nick