Forum Discussion
Robert_Decker_2
Nimbostratus
Mar 06, 2006LDAP redirect not working
How do you redirect _sys_auth_ldap? I've tried the following(x.x.x.x is the IP address of the web page I created):
replace HTTP::respond 401 with HTTP::respond "http://x.x.x.x"
under the AUTH_Failure section
or keep HTTP::respond 401 and add the following to the rule:
when HTTP_RESPONSE {
if { [HTTP::status] contains "401"} {
HTTP::redirect "http://x.x.x.x"
}
}
I cannot redirect the page either way. The page becomes blank after I've failed three logins.
Thank you for your help,
Rob
- Colin_Walker_12Historic F5 AccountI'd recommend taking a look at the complete HTTP::respond syntax. You can see that in the iRules Wiki, here: Click here
HTTP::respond 302 Location "http://new.location.net/app"
- Robert_Decker_2
Nimbostratus
Thank you for the help Colin! I have been able to use your suggestion, however I am now having problems trying to place it in the Irule. I believe that I need to replace "HTTP::respond 401" with "HTTP::respond 302 Location "http://x.x.x.x", but have not been able to do it successfully. The only place where it fires is when I replace the last "HTTP::respond 401" under "when AUTH_WANTCREDENTIAL". The Irule then redirects right away without prompting for username/password. Could you/anyone tell me where this is best suited? - Colin_Walker_12Historic F5 AccountDidn't you want to change this under the AUTH_FAILURE section? Did you try that already and I misunderstood your posting?
- Robert_Decker_2
Nimbostratus
I've added the redirect line in place of the last HTTP::respond line in Auth Failure. This seems to be working now (had other issues I'm troubleshooting). Was this the correct placing? The rule seems to work as long as a username and password is present. I was trying to trigger the rule by adding a username and leaving the password area blank (this never worked). Does PAM require both to be a valid attempt? What happens when a blank password is entered 3 times(the page becomes blank)?
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