I have this rewrite
RewriteCond %{HTTP:x-requested-with} ^XMLHttpRequest$
RewriteRule ^(messages.*) /other/$1 [R=301,NC,L]
I want to redirect all AJAX/XMLHttpRequest requests from /messages
to /other/messages
The condition and rule above works for /messages
but not messages/1.json
Can anyone point me to what is wrong with my rewrite?
Thank you in advance!