Forum Discussion

KTrout_49248's avatar
KTrout_49248
Icon for Nimbostratus rankNimbostratus
Apr 16, 2008

HTTP display assistance

I am new to the F5 world. I am toying around with iRules and need some assistance please.

 

 

I create an iRule that redirects a certain link to another area. Works great. However the URL is misleading to the client. Can I change what URL is returned (display) to the client? This is more cosmetic but they are still confused....as I guess I am too.

 

 

Here is the iRule:

 

 

when HTTP_REQUEST {

 

if { [HTTP::host] contains "maximo.intranet.nrpc"} {

 

HTTP::redirect "Http://mssmaxweb01/MaximoSupport"

 

}

 

}

 

 

 

What should I change to make the display show something else?

 

 

4 Replies

  • I would simply attack the problem at the core. Have the redirected page "http://mssmaxweb01/MaximoSupport" accept requests with the FQDN.

    I.E. supportmaximo.intranet.com and then change the irule to something like the following:

    
    when HTTP_REQUEST { 
        if { [HTTP::host] contains "maximo.intranet.nrpc"} { 
        HTTP::redirect "http://supportmaximo.intranet.com/MaximoSupport"
        }
    }

    hope this help you out

    /CB
  • Which part is misleading to the client? Redirects are basically a HTTP response to the browser with a new url to connect to. The client must be able to resolve the hostname in the url to be able to create a new connection. Are you saying that in your case, "mssmaxweb01" is not a valid hostname for the client to be able to resolve?

    Since I don't totally understand your requirements, I'm shooting at the dark here, but there is another option. If your host mssmaxweb01 is hosted on the same backend servers that your iRule is serving to, you can just change the hostname/URI that is sent to the backend server to get it to "think" the browser sent that redirected request. Something like this:

    when HTTP_REQUEST {
      if { [HTTP::host] contains "maximo.intranet.nrpc"} {
        HTTP::header replace "Host" "mssmaxweb01"
        HTTP::uri "/MaximoSupport"
      }
    }

    Not sure if this is applicable for you or not, but thought I'd bring it up.

    -Joe
  • what is Web01 and where did it come from? You didn't mention that at all in your original post. If you could take a second and describe the entire process and that the outputs are and then your desired outputs, it will be much easier to help you.

     

     

    -Joe