when exploring ajax and XmlHttpRequest(XHR), I realize that browser by default doesn't allow sending XHR to other domains, so one solution is to proxy the site I try to query. so in mysite.com rails app, I like map all request starting with "mysite.com/yahoo" to "api.search.yahoo.com", so XHR call to "/yahoo" transparently gets content from api.search.yahoo.com and update browser UI through js. I tried rewriteRules with no luck: # has no effect. ProxyPass /yahoo http://api.search.yahoo.com/ # this just redirect browser to yahoo, not what i want. RewriteRule /yahoo http://api.search.yahoo.com/ # caused 500 error, and log ask me to setup external webserver app RewriteRule /yahoo http://api.search.yahoo.com/ [P] what's the right way to do this?