Forum Discussion
configt_17313
Nimbostratus
Oct 29, 2012Irule assistance: redirect or pool
Need a quick Irule that will redirect based on a specific URL, if that does not match then use a pool.
This was my first attempt, I do not have a way to test this until we cutover so I wanted to verify syntax first. Thanks
when HTTP_REQUEST {
"www.testurl.com"
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
else
pool pool1
}
3 Replies
- hoolio
Cirrostratus
Can you try this?when HTTP_REQUEST { if { [string tolower [HTTP::host]] eq "www.testurl.com"]}{ HTTP::redirect "https://[HTTP::host][HTTP::uri]" } else { pool pool1 } }
- configt_17313
Nimbostratus
Thanks, will give it a go. - configt_17313
Nimbostratus
This irule worked, thank you.
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