transparentproxy

How to set up proxy in .htaccess

烂漫一生 提交于 2019-11-27 03:17:02
问题 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