Forum Discussion
Mic_108850
Altostratus
May 05, 2010irule and '%23' in URL
Hi,
I'm using the following irule to redirect some requests :
if { not([findstr $ParsedURI "redirect.jsp"] eq "") } {
set MyRedir [string map -nocase {%3a : %3f ? %3d = %26 &} $MyPath]
set ToCache 0
When i request this URL i get an error
http://mydomain/redirect.jsp;jsessionid=aea?path=http%3A//mydomain2/2010/bro/link.html%3Fud_046.html%23fsf
When i request this one with specific symbols, it works
http://mydomain/redirect.jsp;jsessionid=aea?path=http:%3A//mydomain2/2010/bro/link.html%3FFud_046.htmlfsf
How to set my irule to accept the "%23" symbols?
Thanks
- Mic_108850
Altostratus
in fact, with my irule BIG-IP doesn't manage to transform %23 to , - Mic_108850
Altostratus
i solved the problem changind adding matching for %23 - hoolio
Cirrostratus
Another option to decode the URL encoded string would be to use the URI::decode command:set uri {http://mydomain/html/redirect.jsp;jsessionid=dqd?path=http%3A//mydomain2/a/link.html%3Fud_046.html%23d} log local0. "\$uri: $uri" log local0. "\[URI::query $uri\]: [URI::query $uri]" log local0. "\$uri decoded: [URI::decode [URI::query $uri]]"
- Mic_108850
Altostratus
Hi Aaron, thanks for your feebback,if { not([findstr $ParsedURI "redirect.jsp"] eq "") } { set MyRedir [string map $MyPath] set ToCache 0
- hoolio
Cirrostratus
I am not sure what the goal of the iRule is so it's hard to give you a suggestion on what to change. Can you post the full iRule and any background info you might have for what it's supposed to do/issue(s) it's attempting to fix? - Mic_108850
Altostratus
i believe that -nocase(....) have been specified because of some decoding issues on old browser. do you think this could be possible? - hoolio
Cirrostratus
I'm not aware of any browser issues with URL decoding. As I said, the browser should actually be URL encoding the parameter values. The web app should be decoding them before using the parameter values.
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