Forum Moderators: phranque

Message Too Old, No Replies

Redirecting to all the pages of another server from Apache

         

icsraj

5:39 pm on Aug 29, 2007 (gmt 0)

10+ Year Member



I have apache listening to 80 and Jboss listen to 8280. My Apache server Name is users-someone and my jboss is bind to localhost.

I am using the the following

<VirtualHost *:80>
ServerName users-someone
RewriteLog "C:/Apache Group/Apache2/logs/rewrite.log"
RewriteLogLevel 9
RewriteEngine On
RewriteRule ^(.*)$ [localhost:8180$1...] [P]
</VirtualHost>

In this case i am getting to page however my redirected page shows the Jboss Servername and portnumber. I want the [users-someone...] instead [localhost:8180...] Any Help is highly appricited.

Thanks in advance.
Raj

jdMorgan

6:20 pm on Aug 29, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Raj,

Your code should be working. It's not coded as a redirect, but as a proxy through-put. This is as it should be, so I suspect that perhaps the back-end server is doing another redirect for some reason, thus 'exposing' its URL to the client.

Try using a server headers checker to see what headers your client and server are sending to each other. I like the "Live HTTP Headers" extension for Firefox/Mozilla. There are several on-line checkers as well, but some do not show all parts of the transaction.

Jim

icsraj

8:18 pm on Aug 29, 2007 (gmt 0)

10+ Year Member



Hi Jim thank you so much for your valuable suggestion. As you mentioned,I have used the live HTTP headers, the back end server is redirecting the Url. It is really a new stuff for me. How could we handle this type of situations. By another rewrite condition?. Your advice is highly appriciated. If you could throw some light it would be helpful. Thanks in advance.

Raj

jdMorgan

10:02 pm on Aug 29, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You'll have to find out why the back-end is redirecting, and either stop it, or make changes s that it is unnecessary.

Jim