Forum Discussion
Jay_Ward_231434
Nimbostratus
Jun 07, 2016Passthough path and query/parameters, but redirect URL without path or query/parameters.
Hello,
I am looking for some iRule help. I need to be able to passthrough a URL to backend servers that has any path or parameters (this might be default, not sure). For example, https://myexam...
Vijay_E
Cirrus
Jun 07, 2016Try this (untested):
when CLIENT_ACCEPTED {
set DEFAULT_POOL [LB::server pool]
}
when HTTP_REQUEST {
if { ( [string tolower [HTTP::host]] eq "myexample.com")} {
if { not ([HTTP::uri] eq "/") } {
HTTP::respond 301 Location "https://redirecturl.com/"
} else {
pool $DEFAULT_POOL
}
}
}
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