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...
Jun 24, 2019
Your iRule works without any problem on my lab BIG-IP. I don't see any error messages in the /var/log/ltm file. I'm using 14.1.0.3. You could try removing the comments in the iRule. I've seen comments in the iRule being responsible for error messages.
# curl -v http://10.23.98.218 -H "host: www.example.com"
* Rebuilt URL to: http://10.23.98.218/
* Trying 10.23.98.218...
* Connected to 10.23.98.218 (10.23.98.218) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.40.0
> Accept: */*
> host: www.example.com
>
* HTTP 1.0, assume close after body
< HTTP/1.0 302 Moved Temporarily
< Location: http://example.com/
< Server: BigIP
* HTTP/1.0 connection set to keep alive!
< Connection: Keep-Alive
< Content-Length: 0
<
* Connection #0 to host 10.23.98.218 left intact
#
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