# HTTP display assistance

**URL:** <https://community.f5.com/t/http-display-assistance/25739>\
**Category:** Technical Forums\
**Tags:** irules, dev, devops, application-delivery\
**Created:** [April 16, 2008, 2:09pm UTC](https://community.f5.com/t/http-display-assistance/25739 "2008-04-16T14:09:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![KTrout\_49248](https://avatars.discourse-cdn.com/v4/letter/k/b782af/32.png) [@KTrout\_49248](https://community.f5.com/u/KTrout_49248)\
**Post date:** [April 16, 2008, 2:09pm UTC](https://community.f5.com/t/http-display-assistance/25739/1 "2008-04-16T14:09:00Z")

</div>

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](Http://mssmaxweb01/MaximoSupport)”

}

}

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

---

<div class="post-metadata">

**Author:** ![The\_Bhattman](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/the_bhattman/32/13958_2.png) [@The\_Bhattman](https://community.f5.com/u/The_Bhattman)\
**Post date:** [April 16, 2008, 4:13pm UTC](https://community.f5.com/t/http-display-assistance/25739/2 "2008-04-16T16:13:25Z")

</div>

I would simply attack the problem at the core. Have the redirected page “[http://mssmaxweb01/MaximoSupport](http://mssmaxweb01/MaximoSupport)” accept requests with the FQDN.

I.E. [supportmaximo.intranet.com](http://supportmaximo.intranet.com) and then change the irule to something like the following:

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

```

hope this help you out

/CB

---

<div class="post-metadata">

**Author:** ![Joe\_Pruitt](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/joe_pruitt/32/8438_2.png) [@Joe\_Pruitt](https://community.f5.com/u/Joe_Pruitt)\
**Post date:** [April 16, 2008, 5:12pm UTC](https://community.f5.com/t/http-display-assistance/25739/3 "2008-04-16T17:12:46Z")

</div>

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:

```tcl
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

---

<div class="post-metadata">

**Author:** ![KTrout\_49248](https://avatars.discourse-cdn.com/v4/letter/k/b782af/32.png) [@KTrout\_49248](https://community.f5.com/u/KTrout_49248)\
**Post date:** [April 16, 2008, 5:23pm UTC](https://community.f5.com/t/http-display-assistance/25739/4 "2008-04-16T17:23:16Z")

</div>

Web01 still showing up in URL.

---

<div class="post-metadata">

**Author:** ![Joe\_Pruitt](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/joe_pruitt/32/8438_2.png) [@Joe\_Pruitt](https://community.f5.com/u/Joe_Pruitt)\
**Post date:** [April 16, 2008, 6:59pm UTC](https://community.f5.com/t/http-display-assistance/25739/5 "2008-04-16T18:59:47Z")

</div>

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
