Forum Discussion
John_Heyer_1508
Cirrostratus
Aug 09, 2017iRule Variables and Connection Re-Use
I have an iRule that does 301 redirects within the same site, and have noticed when the client reuses the connection the variables seem to not be re-initialized.
when HTTP_REQUEST {
set HO...
ekaleido
Cirrus
Aug 09, 2017Be very careful with variables the way you are using them. Immediatey after acting on them, unset them or they will persist as-is. This might work better for you...
when HTTP_REQUEST {
if { [class match [HTTP::path] eq www_redirects] } {
set value [class match -value [HTTP::path] eq www_redirects]
HTTP::respond 301 "Location" "https://[HTTP::host]$value"
unset value
}
}
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
