Forum Discussion
rhino_109458
Jan 18, 2012Nimbostratus
help on irule redirect
hello
f5 noob here
i have a machine running different virtual servers
i want to make a simple redirect to a speciffic URL and found this on some other posts
wh...
hooleylist
Jan 18, 2012Cirrostratus
Can you try adding some debug logging and reply back with the logs? You can check for the output under /var/log/ltm or in the GUI under System | Logs | Local Traffic. If you put the logs in [ code ] [/ code ] tags (without the spaces) the event names in the logs will be preserved.
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: [HTTP::method] request to [HTTP::host][HTTP::uri]"
if { [string tolower [HTTP::host]] eq "aaa.com" and [HTTP::path] eq "/"} {
log local0. "[IP::client_addr]:[TCP::client_port]: Redirecting to https://aaa.com/hello"
HTTP::redirect https://aaa.com/hello
}
}
when HTTP_CLASS_SELECTED {
log local0. "[IP::client_addr]:[TCP::client_port]: Matched [HTTP::class]"
}
Aaron
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