Forum Discussion
heskez_36146
Nimbostratus
Nov 28, 2013favicon troubles keeps resulting in http 302 redirect
Hi,
We've problems with a website which always asks for the favicon.ico. When it's not to be found the bigip always sends back a 302 redirect and then the session times out.
We tried to contro...
What_Lies_Bene1
Cirrostratus
Nov 29, 2013Ah, I see the issue, corrected version;
when HTTP_REQUEST {
set RequestedPath [string tolower [HTTP::path]]
Redirect only if the HTTP path exactly matches one of the following;
switch $RequestedPath {
"/" -
"/north" -
"/north/" {
HTTP::redirect "https://x/north/applicationurl"
Stop processing the iRule here
return
}
"/south" -
"/south/" {
HTTP::redirect "https://x/south/"
Stop processing the iRule here
return
}
}
if { $RequestedPath starts_with "/north/" } {
if { [active_members Pool_x-north] > 0 } {
pool Pool_x-north
}
elseif { [active_members Pool_www.y.nl] > 0 } {
HTTP::redirect "http://www.y.nl/error/"
}
}
elseif { $RequestedPath starts_with "/south/" } {
if { [active_members Pool_x-south] > 0 } {
pool Pool_x-south
}
elseif { [active_members Pool_www.y.nl] > 0 } {
HTTP::redirect "http://www.y.nl/error/"
}
}
else {
Can't serve fancy error page or HTTP path doesn't match
Let's reject so clients don't have to wait for a timeout
reject
}
}
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