Forum Discussion
DeVon_Jarvis
Mar 09, 2009Nimbostratus
HTTP::is_redirect error?
I have built this iRule to simulate the "Redirect_Rewrite modify" option.
when HTTP_REQUEST {
Save the host
set host [string tolower [HTTP::host]]
}
...
DeVon_Jarvis
Mar 10, 2009Nimbostratus
I added priority to my iRule, causing it to run first, and the errors seem to have disappeared. Wonder what was happening in the other iRules that was breaking this? Any ideas?
The current iRule is:
when HTTP_REQUEST priority 100 {
Save the host
set host [string tolower [HTTP::host]]
}
when HTTP_RESPONSE priority 100 {
if {[HTTP::is_redirect]} {
set location [string tolower [HTTP::header "Location"]]
if { ($location starts_with "http://") and ($location contains $host)} {
HTTP::header replace Location [string map -nocase { "http://" "https://" } [HTTP::header value Location]]
}
}
}
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