I have the following rule in conf file at server.com RewriteEngine On RewriteRule /source(.*) http://example.com/target$1 [P] ProxyRequests Off ProxyPassReverse /source http://example.com/target
http://example.com/target/a.php redirects to http://example.com/target/b.php http://example.com/target redirects to http://example.com/target/ When I visit http://server.com/source/a.php , it redirects correctly to http://server.com/source/b.php which will serve the content from http://example.com/target/b.php as defined in rewriterule, But when I visit http://server.com/source , it does not redirect to http://server.com/source/instead it redirects to http://server.com/target/ The above worked correctly on my local machine Apache 2.2.14/Ubuntu with same setting. I also have checked Location header using firbug while visiting http://example.com/target and http://example.com/target/a.php and in both cases Location header string is full url eg http://example.com/target/ and http://example.com/b.php So In my understanding ProxyPassReverse is not substituting Location header correctly in Apache 2.2.4/CentOS Please help me for this issue. Please let me for any further information. Thank you