Forum Discussion
Mike_Sullivan_2
Nimbostratus
Sep 16, 2014Fixing external links (replace escaped ? and =)
Hi All,
I've been asked if our BigIPs can fix an issue with external links. We see them and sometimes the URL contains escaped question marks and equals signs. I am running 11.5.1 HF3 with ASM en...
Mike_Sullivan_2
Nimbostratus
Sep 16, 2014Thanks all for helping me get the gears turning. I think I have a solution and I'd like some expert feedback (in case it's just a bad approach).
Here is the rule I came up with:
when HTTP_REQUEST {
set ::theuri [HTTP::uri]
log local0. "the URI is $::theuri"
switch -glob $::theuri {
"*%3[fFdD]*" {
set ::myuri [string map -nocase {"%3f" "?" "%3d" "="} $::theuri]
HTTP::redirect "http://[HTTP::host]$::myuri"
}
}
}
Let me know what you think.
Thanks, Mike
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
