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

Filter by:
  • Solution
  • Technology
Answers

URI redirect for /login.aspx or admin type logins

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

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
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

That did it.  Thanks!

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Great. You're welcome.
0