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 http...
Deb_Allen_18
Aug 11, 2006Historic F5 Account
Hi Dominicus -
You have some extra "(" in your if statements, not sure why you're not getting a syntax error, but besides that, the logic looks to me like it will result in an endless redirect loop -- you're redirecting URI's containing "aaa" to a URI containing "aaa", same for "bbb".
If your intention was to redirect to an HTTPS virtual on port 1111 or port 2222, try this instead:
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 that's not what you're trying to do, you'll have to adjust your redirect conditions to exclude the redirect target URI:
if { [HTTP::uri] contains “aaa" and [HTTP::uri] -ne /aaa/abc/receive}{You might also want to use [string tolower [HTTP::uri]] in your comparisons to make them case-insensitive.
HTH
/deb
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