Forum Discussion
southern_shred1
Jun 08, 2018Nimbostratus
iRule Redirect loop
Hi
I am trying to achieve a simple URL redirect but I keep getting a redirect loop or nothing at all. I get an error of "too many redirects"
Condition 1
All requests to "; must be red...
Stanislas_Piro2
Jun 09, 2018Cumulonimbus
Hi,
if the virtual server only provides service for host test.tst.train123.com, use following code :
when HTTP_REQUEST {
if {[HTTP::path] equals "/" } {
HTTP::redirect "/Trace123"
}
}
else you must filter on the host header
when HTTP_REQUEST {
if { [HTTP::host] equals "test.tst.train123.com" && [HTTP::path] equals "/" } {
HTTP::redirect "/Trace123"
}
}
if not required by hostname change or protocol change (http to https redirect), please use "relative URL absolute path" URI in redirect (without protocol and host, but full path)
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