Forum Discussion
Can´t redirect uri with #! special character in it
Hi, I´m having some problems with redirection of uri that contains ! special characters in it. I recieve an request like: http://testsites.company.it/index.html!company-register.html
I tried with httpclass uri paths, but I can´t intercept it. I tried with irules, logging information about what the f5 is recognizing the uri's parts and showed me [HTTP::path]=/company-register.html, [HTTP::uri]=/company-register.html.
when HTTP_REQUEST { if { [HTTP::uri] ends_with "company-register.html" }{ log local0.alert "Path: [HTTP::path] -- Uri:[HTTP::uri] - after" log local0.alert "https://[HTTP::host]/index.html!company-register.html" HTTP::redirect "https://[HTTP::host]/index.html!company-register.html" } }
Apart from that, I don´t understand why I entered to the if (because the code is logging) but I couldn´t redirect. Can somebody help me with that? Regards Ricardo.
4 Replies
- What_Lies_Bene1
Cirrostratus
What TMOS version please? - ib_37889
Nimbostratus
Ricardo
Looks like an escape problem. '' has a special meaning in TCL. If the problem is the tcl interpreter you could try to use literal quoting like this: ( the {} style quoting prevents being parsed by the interpreter ) set redir_uri "https://"; append redir_uri [HTTP::host]; append redir_uri {/index.html!company-register.html}; HTTP::redirect $redir_uri;
If not ... html encoding might work.
- Ricardo_110399
Nimbostratus
Version 10.2.1 (build 297.0) - Ricardo_110399
Nimbostratus
ib, I tried what you said but it didn´t work. I already talked with developers and they are changing sone things in the application (an old and inherited code). Thanks for you answer.
Recent Discussions
Related Content
* 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