Forum Discussion
andrew_deackes_
Nimbostratus
Jul 18, 2014odd behaviour with # in uri
Hi,
I have an irule performing various redirects. However, we've found that if the uri contains a after a / it matches a rule we don't want it to. For example:
https://www.company.coom/fin...
JG
Cumulonimbus
Jul 18, 2014Here's a simple work-around:
when HTTP_REQUEST {
set test_uri [HTTP::uri]
if { $test_uri ends_with "/" } {
HTTP::respond 301 Location "http://www.company.com/docroot"
} elseif { $test_uri eq "/xxxxx" } {
HTTP::respond 301 Location "https://www.company.com/xxxxx"
} else {
set r "https://www.company.com[HTTP::uri]default.page"
HTTP::respond 301 Location $r
}
}
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