Forum Discussion
f5beginner
Cirrostratus
Jun 24, 2019Error logs TCL script HTTP:host
Hello, I´m using this irule: when HTTP_REQUEST {
# Check if the host starts with www.
if {[string tolower [HTTP::host]] starts_with "www."}{
# Redirect with the www. prefix removed to the same UR...
Dario_Garrido
Noctilucent
Jun 24, 2019Hello,
I agree with Kai. There's a command to check if a redirection event occurs before iRule execution (introduced in 14.x).
https://clouddocs.f5.com/api/irules/HTTP__has_responded.html
KR,
Dario.
Kai_Wilke
MVP
Jun 24, 2019Hi Darius,
and the command used before v14 was [catch {HTTP::payload replace 0 0 {}}].
Note: Catching slightly unstable code blocks is most of the time more effective (easier to implement and also less overhead) than implementing extensive error checks... ;-)
Cheers, Kai
- Dario_GarridoJun 24, 2019
Noctilucent
I also agree with this ;-).
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