Forum Discussion

Guillaume_Bruss's avatar
Guillaume_Bruss
Icon for Nimbostratus rankNimbostratus
Feb 21, 2006

Http redirect V2 (For newbie)

Hello,

I saw in the forum I can add this sort of rules


when HTTP_REQUEST {
  if { [HTTP::uri] equals "/" } {
    HTTP::redirect https://[HTTP::host][HTTP::uri "/some_java_app"]
  }
}

I am very neebie for this technology so excuse me in advance for stupid questions

I have a load balanced virtual server (Pool OK / Virtual servr OK)

host1-|

host2-|-> pool

.

on my 2 hosts I have a java_app deployed

.

so with this rule I can force the user to acces this java_app in this virtual server

.

Question:

Is it possible to hide the java_app name??

.

Exemple

http://www.myServer.com/

load balance the server

-http://host1/java_app

-http://host2/java_app

and in my java_application all relative links use www.myServer.com

Thanks

1 Reply

  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    I'm not positive I completely understand the question, but it sounds like you're asking if we can help you send a request to a webserver at an address like "www.domain.com/some_java_app" while making the URL appear to the user as if it's just "www.domain.com".

     

     

    This would require setting up an HTTP::uri rewrite on the HTTP_REQUEST event, and on the return HTTP_RESPONSE event, so that the request was written one way for the server, and another for the client.

     

     

    While this is probably possible, it gets rather tricky relatively quickly, because you have to keep in ind that the server will likely need the information in the URI to continue processing data from the client.

     

     

    -Colin