Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology

answers

URI redirect for /login.aspx or admin type logins

Updated 1/23/2013 • Originally posted on 23-Jan-2013 by Ron 3

New to F5.  Newer to iRules.  I'm trying to set an iRule to block access to admin logins on websites.

I created a data group:  DNN_Login_Redirect
/?ctl_login
/?ctl=register
/admin
/login
/login.aspx
/register
/register.aspx

 

I want the irule to redirect anyone who attempts this access to somewhere.com.  If they do not meet the redirect criteria, then allow them to the site

0
Rate this Question

Answers to this Question

3 Answers:

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Updated 23-Jan-2013 • Originally posted on 23-Jan-2013 by What Lies Beneath 6457
Ron, you may want to change your post and remove where you want things to redirect. This should do it for you;

when HTTP_REQUEST {
 if { [class match [string tolower [HTTP::path]] equals DNN_Login_Redirect] } {
   HTTP::redirect "http://somewhere.com" }
   #Stop processing the iRule for this event here
   return
}
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Updated 23-Jan-2013 • Originally posted on 23-Jan-2013 by Ron 3

That did it.  Thanks!

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Updated 24-Jan-2013 • Originally posted on 24-Jan-2013 by What Lies Beneath 6457
Great. You're welcome.
0
;