Forum Moderators: phranque
I have Apache 2.2 and i am trying to implement apache redirect request to a JBoss server. Now wht's happening is that whenever some hits www.#*$!#*$!.com it very well gets redirected to the desired [aaa.aaa.aaa.aaa:8080...] but the thing is the whole [aaa.aaa.aaa.aaa:8080...] link is displayed instead of the URL www.#*$!#*$!.com
Is it possible to hide the whole IP and the contents and just display www.#*$!#*$!.com, while the user browses the site, here is my Virtual host directive.
<VirtualHost #*$!.#*$!.#*$!.#*$!:80>
ServerAdmin webmaster@#*$!#*$!.com
DocumentRoot "/var/www/html"
Options Indexes FollowSymLinks
ServerName www.#*$!#*$!.com
ErrorLog logs/#*$!#*$!.com-error_log
Redirect / [aaa.aaa.aaa.aaa:8080...]
</VirtualHost>
Please let me something on how to achieve this.
Thanks.
Rajendra.
In contrast, an internal rewrite simply changes the filepath associated with a requested URL-path, and is transparent to the client.
As an alternative to using mod_rewrite, you could also use mod_proxy. The mod_rewrite approach is better if you wish to make the rewrite highly conditional, since the RewriteCond directive may be used to test various characteristics of the requested URL and the values of current server variables. However, many of these possible conditions can also be handled by enclosing mod_proxy code in <Directory>, <Location>, or other containers as well, so using mod_proxy may be simpler.
Note that you need *only* a reverse proxy function to do this. Opening a forward proxy is not required, and should be avoided unless absolutely necessary; Enabling a forward proxy brings in many security concerns and requires the attention of a security expert.
See mod_alias, mod_rewrite, and mod_proxy documents at httpd.apache.org [httpd.apache.org].
Jim