Forum Discussion
jbergeron_10592
Nimbostratus
Jan 24, 2008Unable to make this work - Help Please
Good Morning -
Where am I going wrong? After struggling through this for the past 3 days, I am at my wits end. We are trying to convert our 4.5 rules to 9.4 and to this point have been co...
JRahm
Admin
Jan 24, 2008I'm not sure I have all your if/else logic right, so check it. Also, I substituted contains for matches_regex to save resources, but this may not meet your needs.
1st rule:
when HTTP_REQUEST {
if {not ([HTTP::host] eq "www.xyz.com") } {
if { [HTTP::host] eq "mobile.xyz.com" } {
HTTP::redirect "http://www.xyz.com/mobile"
} elseif { ([HTTP::uri] contains "xyzfreeconversion.asp") \
or ([HTTP::uri] contains "getconversion.asp") \
or ([HTTP::uri] contains "whoami.asp") } {
pool LAX_ORIGIN_SERVERS
} else { HTTP::redirect http://www.xyz.com/[HTTP::uri] }
} else { pool LAX_ORIGIN_SERVERS }
}If this works for you, try adjusting the second rule yourself, and if you get stuck, post back.
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