Maybe this answer is a little bit late but i had the same problem with 301 response on ajax request. The solution was quite simple:
apache rewrite rule is something like this:
RewriteRule ^([^/]\w+)/?$ index.php?%{QUERY_STRING} [L,E=MODULE:$1]
Your XHR-Request url looks someting like this:
/this/is/a/canonical/url + '?param=1¶m=2...'
It will lead to the 301 moved permanently if you dont use a direct file call (f.i. *.php) and rewrite to canonical URL (looks like a directory-path without f.i. *.php) instead.
To solve this problem just add a / to your XHR-Request-URL like this:
/this/is/a/canonical/url + '/' + '?param=1¶m=2...'
Maybe this will help someone.