Forum Discussion
muzammil_88686
Nimbostratus
Feb 13, 2013Blocking 2 URLs and Allowing 1 URL
Dear Team,
I want to block the below URLs
www.xyz.com/cc_page
www.xyz.com
And want to allow the below URL
www.xyz.com/test_page
Could someone help m...
nathe
Cirrocumulus
Feb 13, 2013muzammil,
Loads of examples of this type of irule on DC.
How about something like this:
when HTTP_REQUEST {
switch [string tolower [HTTP::uri]] {
"/cc_page" -
"/" { drop }
}
}
This would inherently allow test_page uri.
Or you may want to redirect to test_page thus:
when HTTP_REQUEST {
switch [string tolower [HTTP::uri]] {
"/cc_page" -
"/" { HTTP::redirect "http://[HTTP::host]/test_page" }
}
}
This probably depends on what other URIs you have and what you want to do with them. Hope this is a good starting point though.
Hope this helps,
N
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