Forum Discussion
Eric_Flores_131
Cirrostratus
Jun 08, 2016Getting Started with iRules LX, Part 3: Coding & Exception Handling
So far in this series, we have covered the conceptual overview, components, workflows, licensing and provisioning of iRules LX. In this article, we will actually get our hands wet with some iRules LX...
Eric_Flores_131
Cirrostratus
Joined May 04, 2019
skravens_86061
Nimbostratus
Jan 31, 2011Chris,
Below I have modified your redirect irule:
The page that i am trying to URL that I am redirecting from onlt uses 8443, not 80. Will the irule below redirct any requests to qa-dognet.org over to the 192.168.XXX.X address after a 5 second error page? Also can I take the support.com fallback information out?
<
when HTTP_REQUEST {
if { [TCP::local_port] eq "80" } {
persist source_addr 60
HTTP::fallback http://support.com/
set dtime 5
Un-comment the next 3 lines for redirects and expand out with elseif's if needed
if { [HTTP::host] == "www.qa-dognet.org" } {
HTTP::respond 200 content \
"
\We are sorry, but the site you are looking for is temporarily out of service." "Content-Type" "text/html"
} else {
pool DMX-POOL
Un-comment the net line if using redirects
}
} elseif { [TCP::local_port] eq "8443" } {
HTTP::header insert "BPL-SSL" "On"
pool DMX-POOL
} else {
set srvr [findclass [TCP::local_port] $::Individual_Servers " "]
if { $srvr ne "" } {
node $srvr 80
} else {
Replace with the default URL of the site
HTTP::redirect ""
}
}
}
Thanks again Chris!
- Rohit_NaikDec 05, 2024
Employee
Well explained all the multiport use case scenarios.
Recent Content
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