How to set up proxy in .htaccess
问题 The Apache documentation states that RewriteRule and the should be put in the server configuration, but they can be put in htaccess because of shared hosting situations. I am in such a situation. I am trying to set up a transparent proxy: RewriteEngine On RewriteCond %{REQUEST_URI} ^/foo [OR] RewriteCond %{REQUEST_URI} ^/bar RewriteRule ^(.*)$ http://example.com/$1 [P] This is working fine...except for redirects (like if /foo redirects to /bar ). Redirects go back to example.com, not my