httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krist van Besien" <krist.vanbes...@gmail.com>
Subject Re: [users@httpd] url reformat - howto
Date Thu, 18 May 2006 07:52:42 GMT
On 5/18/06, Oliver A. Rojo <oliverrojo@anticogroup.com> wrote:
> Hi all!
>
> Im running Java pages on my server. Basically, all pages will have a
> direct url like http://mydomain.com:8080/mydir
>
> What I did is for user not to type a long url by simply typing the
> normal domain such as http://www.mydomain.com and redirecting to
> http://www.mydomain.com:8080/mydir.
>
> What appears to be my problem is how to avoid the whole
> http://www.mydomain.com:8080/mydir url appear on the browser which is
> when I type in the absolute domain, http://www.mydomain.com:8080/mydir
> url will just map into http://www.mydomain.com which will eventually
> appear on the client's browser.

This is what happens when you do a redirect:

- Browser requests  http://www.mydomain.com
- Server answers with "I don't have this, but try
http://www.mydomain.com:8080/mydir in stead.
- Browser requests http://www.mydomain.com:8080/mydir

And for this reason the new URL apears on the adress line of the
browser. This is by design.

If you want to hide the fact that resources are not where they apear
to be you need to use reverse proxying, not redirection.

Krist

-- 
krist.vanbesien@gmail.com
Solothurn, Switzerland

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message