Forum Discussion

Ron_126046's avatar
Ron_126046
Icon for Nimbostratus rankNimbostratus
Jan 23, 2013

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

 

3 Replies

  • 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
    }