RewriteRule and Proxy

Posted by Felipe Alvarez on Server Fault See other posts from Server Fault or by Felipe Alvarez
Published on 2011-11-14T05:39:56Z Indexed on 2011/11/16 1:55 UTC
Read the original article Hit count: 806

Filed under:
|

Two servers. example.net, and example.com

On http://example.net, My httpd.conf contains

# example.net
RewriteEngine On
RewriteRule  ^/felipetest2 http://example.com/webpage [P]

I am getting a 302 Moved, which is pointing to http://example.net/webpage, but should be http://example.com/webpage

What's going on?

I have control over both .net and .com servers in these examples.

I know I can do the same with ProxyPass and ProxyPassReverse, but I'm trying to get my head around this one.

Edit: Main Question: How do I show a maintenance page, without changing URL in the browser? On same domain, or across different domains?

© Server Fault or respective owner

Related posts about apache2

Related posts about mod-rewrite