Forum Discussion
Dave_21507
Nimbostratus
Oct 01, 2009HTTP::uri starts_with - how to make it case insensitive?
Hello everyone,
I have the following iRule in place and it works great, but discovered that a "workaround" is using onlineusers.aspx or any other combination of case (e.g., OnLineUSerS.ASPx wouldn't redirect to login.aspx).
when HTTP_REQUEST {
if { ( [HTTP::uri] starts_with "/OnlineUsers.aspx" )
and ( not [ matchclass [IP::client_addr] equals $::ips_irule ] ) }{
HTTP::redirect https://[HTTP::host]/login.aspx}}
Is there a way to modify it so it's not case sensitive?
Thanks!
- hoolio
Cirrostratus
Hi, - Dave_21507
Nimbostratus
Ahh okay great thanks. That will get me started. - Dave_21507
Nimbostratus
All set!! - hoolio
Cirrostratus
There is an issue with this in that someone could make a request to /doesnt_exist/../allowed_uri/whatever and that would bypass your rule logic and go to the default pool. The webserver would normalise the requested URI to /allowed_uri. - Dave_21507
Nimbostratus
Ahh yes that's an interesting point you bring up. However, I'm not using this irule to direct users to different application pools. Using it simply to force people who are trying to access a certain page, and aren't coming from certain IP's to a login screen. - hoolio
Cirrostratus
Are you trying to prevent certain clients from ever accessing specific URIs? If so, the iRule could be bypassed using obfuscation techniques.
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