Forum Discussion
rahulc_290651
Nimbostratus
Dec 29, 2016Bind URI with a secific virtual server
Hello Team,
Let's say we have 2 virtual server's configured and both of them are listening for same web server ( Same pool )
Our requirement is we should be able to restrict access on basis of U...
Stanislas_Piro2
Cumulonimbus
Dec 29, 2016Hi,
you can try somthing like that (not tested)
when RULE_INIT {
array set static::VS_HOST {
/Common/VS1 "app1.company.com"
/Common/VS2 "app2.company.com"
}
}
whrn HTTP_REQUEST {
if {[info exists static::VS_HOST([virtual name])] && [HTTP::host] ne $static::VS_HOST([virtual name])} {
HTTP::respond 403 -version "1.1" content "Request RejectedYou are not authorized to access this page" noserver Connection Close
}
}
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