Forum Discussion
ashok_65614
Nimbostratus
Mar 11, 2010irule for URI
URL : www.test.com/abc/test/login
I need to match the condition as below
If my host = test.com & uri starts with /abc
then the below url only should work
"www.test.com/abc/test/login "
else page not found.
Note: This should not affect rest or the URI in the host.
Can any one provide the iRule for implementing this.
- hoolio
Cirrostratus
Maybe something like this?when HTTP_REQUEST { Check host is www.test.com if {[string tolower [HTTP::host]] eq "www.test.com"}{ Check if URI starts with /abc if {[HTTP::uri] starts_with "/abc"}{ Check if URI is not exactly "/abc/test/login" if {[HTTP::uri] ne "/abc/test/login"}{ Send a 404 response HTTP::respond 404 content {not found} } } } }
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