Forum Discussion
iRule not working on few machines
I have a problem with iRule based url redirection, just a simple to redirect host to a path like below
when HTTP_REQUEST {
if { [HTTP::host] equals "example.com"}
{
HTTP::redirect "https://example.com/login"
}
}
I tried this as well
when HTTP_REQUEST {
if { [HTTP::uri] equals "/"}
{
HTTP::redirect "https://[HTTP::host]/login"
}
}
Both works in redirecting the site but on few machines, few other vlan users are getting too many redirects or just the page spinning.Not sure why this works on few machines while not on others. Packet capture is not so helpful as backend on HTTPS. Please suggest.
Sri1 In order to know why you are receiving so many redirects we need a bit more information on the virtual servers that this iRule is applied to and where in your topology these users are that receive multiple redirects. If I had to guess without any of that other information most likely this iRule is also applied to the 443 virtual server or they reside in the same subnet as the destination server causing these redirects.
Only a hint for when you cannot properly do a traffic capture: most browsers have a 'debug' option that allow you to see each request and response in detail, which is quite nice to see what's happening on the client side.
Both Chrome and Firefox use F12 to activate this option.
/Mike
Recent Discussions
Related Content
* 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