Forum Discussion
Martin_Woodhous
Nimbostratus
Mar 21, 2007if, elseif and adding comments within.
I'm trying to write a rule to redirect users based on source IP subnet.
i've come up with the following, but i'd like to be able to add comments to identify each subnet to a name (this could be i...
Wes_98712
Nimbostratus
Mar 22, 2007Hmm...interesting, I've added comments all over the place as follows:
if { [ matchclass $my_uri contains $::some_class] } {
if { $my_uri starts_with "/somestring" } {
set my_host somenewhost
set my_uri [HTTP::uri]
HTTP::redirect "http://$my_host$myuri"
} else {
log local0. "URL: http://$my_host$my_uri"
pool somepool
}
Perhaps it is the placement of the that is in question? Not sure, but this works for me.
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