Forum Discussion
Dominicus_Hinda
Nimbostratus
Aug 11, 2006HTTPS Redirect -> hang
Hi,
I have tried to use iRule to meet the following requirement:
https://abc.com/aaa/xxxx redirect to https://abc.com/aaa/abc/receive:1111
https://abc.com/bbb/xxxx redirect to https://abc.com/bbb/abc/receive:2222
iRule
************************************
rule redirect_rule {
when HTTP_REQUEST {
if { ([HTTP::uri] contains “aaa" } {
HTTP::redirect https://[HTTP::host]/aaa/abc/receive:1111
} elseif { ([HTTP::uri] contains “bbb" } {
HTTP::redirect https://[HTTP::host]/bbb/abc/receive:2222
}
}
}
************************************
But it is hang when I access the above URL.
How to solve this problem?
Thanks,
- hoolio
Cirrostratus
Hi, - Deb_Allen_18Historic F5 AccountHi Dominicus -
if { [HTTP::uri] contains “aaa" } { HTTP::redirect https://[HTTP::host]:1111/aaa/abc/receive } elseif { [HTTP::uri] contains “bbb" } { HTTP::redirect https://[HTTP::host]:2222/bbb/abc/receive }
if { [HTTP::uri] contains “aaa" and [HTTP::uri] -ne /aaa/abc/receive}{
- unRuleY_95363Historic F5 AccountI can't believe no one else sees the problem. Since the place you are redirecting also contains "aaa", you are in an indefinite redirect loop (thus the "hang").
Also note, that the location of the port :1111 should be after the host, not at the end of the uri (unless you actually want it as part of the uri).if { ([HTTP::uri] starts_with "/aaa/") and not ([HTTP::uri] starts_with "/aaa/abc/") } { HTTP::redirect https://[HTTP::host]:1111/aaa/abc/receive } elseif ... same as above for /bbb ...
- unRuleY_95363Historic F5 AccountI had started typing my reply before Deb posted her response... Sometimes it takes me a while to actually find the time to provide a response - interruptions here, interruptions there, oh, late for a meeting, etc, etc...
- Dominicus_Hinda
Nimbostratus
Hi All,
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