Forum Discussion
Mike_59458
Nimbostratus
Sep 14, 2011Redirect on URI
Looking for some help to finish off this irule. I am trying to redirect to http error message 401 if the virtual server gets HTTPS://MAIL.DOMAIN.COM/OWA. All other URI can pass but need to block the /OWA. What I have so far is:
when CLIENT_ACCEPTED {
HTTP::enable
}
when HTTP_REQUEST {
if { [HTTP::URI] eq /owa }
then {
How do I return a 401 error?
Mike
4 Replies
Sort By
- Michael_Yates
Nimbostratus
You can use the HTTP::respond command. You can specify the HTTP Status Code. - Mike_59458
Nimbostratus
So I have the below but iRules does not like line 5. What is the correct syntaxs? - Michael_Yates
Nimbostratus
Hi Mike,when HTTP_REQUEST { HTTP::enable if {[string tolower [HTTP::uri]] eq "/owa" } { HTTP::respond 401 } }
- Michael_Yates
Nimbostratus
Oh, I did not notice until I hit Submit.
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