Forum Discussion

nes_66505's avatar
nes_66505
Icon for Nimbostratus rankNimbostratus
Jun 23, 2017

Rewrite or redirect in irule

Hi,

 

We want to create an irule to rewrite "application.company.com" to "application.company.com/toto", but all the irul that we found doesn't work.

 

Someone can help me?

 

Regards.

 

Miguel

 

1 Reply

  • P_K's avatar
    P_K
    Icon for Altostratus rankAltostratus

    Try this.

     

    when HTTP_REQUEST {

     

    if {[string tolower [HTTP::host]] eq "application.company.com" && [HTTP::uri] eq "/"} {

     

    HTTP::uri "/toto"

     

    log local0. "redirecting to application.company.com[HTTP::uri]"

     

    }

     

    }

     

    Hope this helps! Let us know if you see issues.