To simply map a URL to another server, we use the [P] flag, as
follows:
RewriteEngine on
RewriteBase "/products/"
RewriteRule "^widget/(.*)$" "http://product.example.com/widget/$1" [P]
ProxyPassReverse "/products/widget/" "http://product.example.com/widget/"
In the second example, we proxy the request only if we can't find
the resource locally. This can be very useful when you're migrating
from one server to another, and you're not sure if all the content
has been migrated yet.
RewriteCond "%{REQUEST_FILENAME}" !-f
RewriteCond "%{REQUEST_FILENAME}" !-d
RewriteRule "^/(.*)" "http://old.example.com/$1" [P]
ProxyPassReverse "/" "http://old.example.com/"