Forum Discussion
KTrout_49248
Nimbostratus
Apr 16, 2008HTTP 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?
- The_Bhattman
Nimbostratus
I would simply attack the problem at the core. Have the redirected page "http://mssmaxweb01/MaximoSupport" accept requests with the FQDN.when HTTP_REQUEST { if { [HTTP::host] contains "maximo.intranet.nrpc"} { HTTP::redirect "http://supportmaximo.intranet.com/MaximoSupport" } }
- 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?
when HTTP_REQUEST { if { [HTTP::host] contains "maximo.intranet.nrpc"} { HTTP::header replace "Host" "mssmaxweb01" HTTP::uri "/MaximoSupport" } }
- KTrout_49248
Nimbostratus
Web01 still showing up in URL. - 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.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects