Forum Discussion
barry_8239
Nimbostratus
Nov 30, 2012irule http redirect help
Hi All, i am fairly new to F5 world and need some assistance in redirecting a url. I've tried the following, but the browser will still show http://example/test and not the new url http://newserver/...
barry_8239
Nimbostratus
Nov 30, 2012I have it halfway working now. IS there a way to add another host name to the above irule?
The redirect works when entering example in the browser, but i also need to add "sample" as well. Would the following work? When i put sample in the url i get an iis page and not redirected to newserver.
when HTTP_REQUEST {
if { [HTTP::host] contains "example" or "sample" } {
HTTP::redirect "http://newserver[HTTP::uri]"
}
}
when HTTP_REQUEST {
if { [HTTP::host] contains "example" or "sample" } {
HTTP::redirect "http://newserver[HTTP::uri]"
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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