Forum Discussion
pbelamge_70866
Nimbostratus
May 20, 2011URL Re-Writing help needed
Hello All,
I am new to iRule and would like to know how can I solve my below mentioned problem
I have f5 switch and want this switch to filter incoming http requests based on domai...
hoolio
Cirrostratus
May 20, 2011Is the client sending an absolute URL in the URI and the web app can't handle this? If so, do you want to remove the protocol and host from the URI? If that's the case, you should be able to use something like this:
when HTTP_REQUEST {
Check for an absolute URI
if {not ([HTTP::uri] starts_with "/")}{
if {[scan $abs_uri {%[^/]//%[^/]%s} proto host uri] == 3}{
Log and set the URI to a local URI
log local0. "\$proto: $proto, \$host: $host, \$uri: $uri"
HTTP::uri $uri
}
}
}
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