Forum Discussion
Syntax to Map Virtual-Server's Character with Data-Group which Contains Pool Name
Sir,
The below is the original Irule which we are modifying:
HTTP Profilr IRULE:
when CLIENT_ACCEPTED { set default_pool [LB::server pool] log local0. "Default pool [LB::server pool] set" log local0. "Client IP is [IP::remote_addr]" }
when HTTP_REQUEST { set https_uri [string tolower [HTTP::uri]] log local0. "requested [HTTP::uri]" if {$https_uri equals "/" } { HTTP::redirect "https://ctbuild.leni2.com/SEUILibrary/controller/e/web/LenovoPortal/en_US/catalog.workflow:test-home" pool pool_ctbuild.leni2.com_http
log local0. "redirected from /"
return
} elseif { $https_uri starts_with "/iss_static" } {
log local0. "matched /iss_static"
pool pool_confarmct.leni2.com_http
log local0. "pool_confarmct.leni2.com_http defined, [LB::server pool] selected" return
} else {
log local0. "no match for rev. close connection" pool pool_ctbuild.leni2.com_http
}
}
And HTTPS Profile IRULE:
when CLIENT_ACCEPTED { set default_pool [LB::server pool] log local0. "Default pool [LB::server pool] set" log local0. "Client IP is [IP::remote_addr]" }
when HTTP_REQUEST { set http_uri [string tolower [HTTP::uri]] log local0. "requested [HTTP::uri]" if {$http_uri equals "/" } { HTTP::redirect "http://ctbuild.leni2.com/SEUILibrary/controller/e/web/LenovoPortal/en_US/catalog.workflow:test-home" pool pool_ctbuild.leni2.com_http
log local0. "redirected from /"
return
} elseif { $http_uri starts_with "/iss_static" } {
log local0. "matched /iss_static"
pool pool_confarmct.leni2.com_http
log local0. "pool_confarmct.leni2.com_http defined, [LB::server pool] selected" return
} else {
log local0. "no match for rev. close connection" pool pool_ctbuild.leni2.com_http
}
}
=======
Diving this into part:
Ist part:
when HTTP_REQUEST { set https_uri [string tolower [HTTP::uri]] log local0. "requested [HTTP::uri]" if {$https_uri equals "/" } { HTTP::redirect "https://ctbuild.leni2.com/SEUILibrary/controller/e/web/LenovoPortal/en_US/catalog.workflow:test-home" pool pool_ctbuild.leni2.com_http
this part we are modiying by:
when HTTP_REQUEST {
switch -glob [string tolower HTTP::uri]] {
"/" {
log local0. "redirecting from /"
HTTP::redirect "http://www.parveez.com/us/en"
return
pool pool_www.parveez.com_http
}
2nd part: is determined by elseif : is /iss_static part which is replaced by Data-Group: Parveez_Static1
and 3rd part is determined by : else which is replaced by Data-Group: Parveez_Dynamic1
Seems like Dynamic page contents are coming but all 404 errors( STATIC contents not coming) in fiddler when putting the static pool under the Data-Group.
Thanks and Regards
Parveez
Recent Discussions
Related Content
* 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