Forum Discussion
Anush
Nimbostratus
Mar 02, 2015Data group "/" definition
Hi Experts,
Thanks in advance for your time and respond to this question.
I have request to redirect couple of URLs to specific site.
https://abc.com/ or
https://abc.com/uri1 or
http...
Brad_Parker_139
Nacreous
Mar 02, 2015give this a try:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "abc.com" && [HTTP::uri] equals "/" } {
HTTP::redirect "https://def.com"
}
elseif { [class match [string tolower [HTTP::uri]] starts_with "/Common/URL_REDIRECT"] } {
HTTP::redirect "https://def.com"
}
else {
pool POOL_NAME
}
}
- AnushMar 02, 2015
Nimbostratus
Thanks Brad. One last question. I am using GUI to add list of URIs in data group /uri1 := /uri2 := is this the correct syntax? Thanks - Brad_Parker_139Mar 02, 2015
Nacreous
yep, that will work.
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