Forum Discussion
amanthin_4026
Nimbostratus
Jul 20, 2012How can I detect # sign in URI using irule
I'd like to distinguish between the following two URLs
1) https://host.com/abc/ux/flash.html
2) https://host.com/abc/ux/flash.htmltab=Home%28page=Home&id=h4rih9ki%28%29%29
The difference between these two URLs is the existence of and some characters.
The set uri [] has the same value for both the above URLs. Is there a different header attribute or something that I can use to detect this ?
6 Replies
- John_Matlock_42
Nimbostratus
Might not be the most graceful solution, but using "contains" works. I threw this onto a dev F5 and tested-- seems to work.
if {[HTTP::uri] contains ""} { log local0. "Found " } else { log local0. "No " }
You could also just grab everything after the first using the following:
set vars [getfield [HTTP::uri] "" 2]
Hope this is atleast somewhat helpful.
John - nitass
Employee
is it fragment identifier?
i thought it is client-side only i.e. browser does not send it to server (bigip).
Fragment identifier wiki
http://en.wikipedia.org/wiki/Fragment_identifier - John_Matlock_42
Nimbostratus
Haha, that completely slipped my mind. Nitass is most likely on the right track. - amanthin_4026
Nimbostratus
Is it possible for the browser to not send anything after ? - nitass
Employee
Is it possible for the browser to not send anything after ? i do not see browser sends it in my lab unit. have you seen it? do you have tcpdump? - hoolio
Cirrostratus
As Nitass said, the user-agent shouldn't include the anchor (or fragment) in its request to the web server--it's just by the server to tell the client how to render the page and/or focus the page once it is loaded.
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
