Forum Discussion
kg_50758
Nimbostratus
Jul 25, 2007Standard HTTPs redirect
I am new to iRules, when i tried the standard https redirect if the url ends with '.do, could not get it to working. iRules i used is as below
when HTTP_REQUEST {
if { [HTTP::uri]...
hoolio
Cirrostratus
Jul 26, 2007You might want to compare with HTTP::path instead of HTTP::uri. HTTP::uri contains the query string as well as the path/object, whereas HTTP::path contains only the path/object. Can you try the following:
when HTTP_REQUEST {
log local0. "client [IP::client_addr] -> [HTTP::host] for uri: [HTTP::uri], path: [HTTP::path]
if { [HTTP::path] ends_with ".do" } {
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
}Aaron
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
