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

Questions and Answers


Loading

Submitting

URI redirect for /login.aspx or admin type logins

question

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

3 Answer(s):

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
}

That did it.  Thanks!

Great. You're welcome.

Your answer: