Forum Moderators: phranque

Message Too Old, No Replies

apache redirect.

         

culdude1234

7:57 pm on Oct 28, 2011 (gmt 0)

10+ Year Member



Hi I am very new to apache. I just wanted to know if following case is allowed in apache redirect.

I have apache running on one machine. And then another app running on apache on other machine.

Now i need to redirect [machine1.com...] to [machine2.com...] But i dont want the browser url to be chanhed to machine2.com. Is it possible? I was able to set up the redirect but the browser address is changed to destination url which is not required. Any help is appreciated...

Thanks,

g1smd

8:08 pm on Oct 28, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Look at the [P] or [PT] flags instead of the [R] flag.


RewriteRule can be configured to perform rewriting, redirecting or proxying requests.

culdude1234

8:29 pm on Oct 28, 2011 (gmt 0)

10+ Year Member



Thank you..I already tried the PT and P flags. With PT it doesnt even redirect and with P it redirects but changes the url in browser. This is what I have in my httpd.conf.
Am I missing something?

RewriteEngine on
RewriteRule /glpi [x.com...] [P]

culdude1234

9:43 pm on Oct 28, 2011 (gmt 0)

10+ Year Member



I even tried to do proxyPass but its asking for authentication...We have authentication set up on both the servers


<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /glpi [x.com...]

What could be the issue?

lucy24

1:22 am on Oct 29, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Start with the most horribly obvious question: Do you have mod_proxy in both places, and is it working as intended? Also check mod_proxy_http and possibly mod_cache.

If you thought Apache's mod_rewrite docs were scary, wait until you look at these. Nothing but red boxes and warning messages as far as the eye can see.