Forum Discussion
Brendan_Hogan_9
Nimbostratus
Sep 10, 2010Error 310 when doing a maintenance redirect
My developer is trying to do a redirect that allows certain ip's to go to an application while all others are directed to an outage page.
* In IE It partially works (but missing part of the applicatio...
hoolio
Cirrostratus
Sep 20, 2010Hi Brendan,
Here's is a copy of your iRule with [ code ] [/ code ] blocks to preserve spacing:
when HTTP_REQUEST {
set path [HTTP::uri]
set host [string tolower [HTTP::host]]
set bredirect 1
if { [IP::addr [IP::client_addr] equals 105.105.105.81] } {
set bredirect 0
} elseif { [IP::addr [IP::client_addr] equals 105.105.105.236] } {
set bredirect 0
} elseif { [IP::addr [IP::client_addr] equals 105.105.105.165] } {
set bredirect 0
}
if { [HTTP::uri] equals "/" }{
set path "/vccs/Main.action"
}
if { $bredirect == 0 } {
HTTP::redirect "https://www.name.org$path"
} else {
HTTP::redirect "https://outage.name.org"
}
}
Can you add logging to the iRule to record what's happening when the client receives too many redirects? I assume it's due to the iRule looping for an unanticipated reason.
Are you adding this iRule to the HTTPS VS https://outage.name.org resolves to? If so, you might want to only redirect specific URIs like / or not redirect URIs that are required to serve the outage content.
Aaron
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