Forum Discussion
Net_Admin_86160
Nimbostratus
Sep 10, 2013Doing redirects using datagroups
Hello,
I am trying to do redirects using datagroups and getting stuck with the actual redirect using -value
I have a data group called
prod_domains_dg
mydomain.ny1.com:=mydomain.ny1.com/1nyb
my...
Net_Admin_86160
Nimbostratus
Sep 10, 2013Thanks Kevin , and what lies beneath - because I am blind .
this is working now
mydomain.ny1.com := /1nyb
mydomain.ny2.com := /2nyb
when HTTP_REQUEST {
if { [class match [string tolower [HTTP::host]] equals Prod_Domains_dg] } {
if { [HTTP::uri] equals "/" } {
HTTP::redirect https://[HTTP::host][class match -value [string tolower [HTTP::host]] equals Prod_Domains_dg]
}
}
if { [class match [string tolower [HTTP::host]] equals Staging_Domains_dg] } {
if { [HTTP::uri] equals "/" } {
HTTP::redirect https://[HTTP::host][class match -value [string tolower [HTTP::host]] equals Staging_Domains_dg]
} else {
use pool stagingWEBFORMS
}
}
}
- What_Lies_Bene1Sep 10, 2013
Cirrostratus
You're welcome
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