Forum Moderators: phranque

Message Too Old, No Replies

Redirect URL problem

Need to get the original URL on address bar

         

mugunth75

7:09 pm on Aug 1, 2007 (gmt 0)

10+ Year Member



Hi,
We have an application running like [xyz.abc.com...]
Also when ever there is a call like [xyz.poi.com...] the apache redirects to [xyz.abc.com....]

The requirement is, after the redirect, the address bar should display xyz.poi.com instead of the original xyz.abc.com.
Can any one help me with this.

jdMorgan

11:18 pm on Aug 1, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No. The definition of a redirect is that the server tells the client (browser) that the content has moved, and it provides the new URL where the browser can find that content. This ends the current HTTP transaction.

The browser will then (usually) issue a new HTTP request, using the address provided by the previous server redirect response. In doing so, it updates the address bar to show the URL that it is using.

So, the URL appearing in the browser address bar is controlled by the client (browser), not by the server.

For an alternative, look into using an alias, an internal rewrite, or a reverse proxy request instead of using a redirect. See Apache aod_alias, mod_rewrite, and mod_proxy.

Jim