I am not able to achieve the result
This is HTTP_REQUEST section of my functional/production iRule,
Can you help me modifying it so I can achieve following:
URI = /one Converted URI = /web/main/page, Pool member = node1:8180
URI = /two Converted URI = /web/main/page, Pool member = node2:8180
Note:
This is a SSL site and The pool which serves the website is the app pool.
==============================================================
when HTTP_REQUEST {
if { [HTTP::header Content-Length] > 0 } then {
set req_length [HTTP::header "Content-Length"]
HTTP::collect $req_length
} else {
set req_length 0
}
if { [HTTP::header "Referer"] ne "" } then {
set referer [HTTP::header "Referer"]
} else {
set referer -
}
Reject unsupported HTTP methods
if { ![matchclass [HTTP::method] equals $::safe_http_methods] } {
set trafficLog "$trafficLog REJECTED:badMethod"
log local0. $trafficLog
HTTP::respond 200 content " Some message here " noserver
}
Before we consider sticky sessions
switch -glob [string tolower [HTTP::uri]] {
"/outage" -
"/maintenance.html" {
HTTP::respond 200 content "" Some message here " noserver
}
"*.exe*" -
"*.dll*" -
"/index.html" -
"/siteasso/" -
"/siteasso/index.html" -
"/jboss.css" -
"/logo.gif" -
"/manager*" -
"/status*" -
"/jmx-console*" -
"/web-console*" -
"/jolokia*" -
"/jbossws*" {
Unauthorized Access Attempted
set trafficLog "$trafficLog REJECTED:secureURI"
log local0. $trafficLog
HTTP::respond 200 content "Some message here" noserver
}
"/" -
"" {
Auto-redirect to main login page
set trafficLog "$trafficLog 302 REDIRECT:mainLogin"
log local0. $trafficLog
HTTP::respond 302 noserver Location "https://[HTTP::host]/Sitea/Web/Main"
HTTP::respond 302 noserver Location "https://[HTTP::host]/maintenance.html"
}
}
Enforce Sticky Sessions
if { [HTTP::cookie "JSESSIONID"] ne "" } {
persist uie [HTTP::cookie "JSESSIONID"] 1920
}
Finally, Loadbalance requests not handled above
switch -glob [string tolower [HTTP::uri]] {
"/gatekeeper*" -
"/scorm_launch*" -
"/aicc_bridge*" -
"/assets*" -
"/siteaasset*" -
"/content*" -
"/crossdomain.xml" -
"/siteacontent*" -
"/sitea_images*" {
use pool learningzone_sitea-content-pool
}
"/*" {
use pool sitea-app-pool-breakdown-testing
}
}
}