/user/123, which actually corresponds to
user.php?id=123. If you append
?callback=xxxto the URL then chances are the code will break, because mod_rewrite will rewrite the URL to something like
user.php?id=123?callback=xxx. What you actually want to send to your web server is
user.php?id=123&callback=xxx(note the & before "callback"). After much grief trying to figure out how to coerce Apache mod_rewrite into handling this situation I found the answer, of course, on Stack Overflow. If you use the
[QSA]flag, Apache will append the additional callback parameter onto the end of the rewritten URL, so JSONP will now work. Once again, Stack Overflow turned a show-stopper into a learning experience.