Forum Discussion

GFort_32452's avatar
GFort_32452
Icon for Nimbostratus rankNimbostratus
May 23, 2012

Need some help writting a https redirect

I am new to the F5, two weeks ago I never seen and F5. I currently have a virtual setup with two nodes using port 443. Everthing seems to be working fine. I am trying to figure out how to shortent he URL the users has to enter. Currently they have to enter I would like to shorten with an irule if possible to where they only need to type in and it will take that and redirect them to the longer URL transparently. I looked at some iRules and they really did not make alot of sense to me right now. The resetmypasswordqa is the name of the virutal server on the F5. Any help or information is greatly appreciated.

 

 

Thanks

 

Gary
  • You need to create an iRule and apply it to your virtual server under the resources tab. Perhaps something like this?

    
    when HTTP_REQUEST {
        if { ([HTTP::path] eq "") or ([HTTP::path] eq "/") }{
            HTTP::redirect "https://resetmypasswordqa/itim/self/Login/Logon.do"
        }
    }
    
  • For some reason when I try to apply an iRule to the virtual server I get the following message:

     

    01070394:3:HTTP_REQUEST event in rule (rule_name) requires and associated HTTP or FASTHTTP profile on the virtual server (virtual_server_name)

     

     

    I went into profiles, services, and http and created one that is had all the defaults and then applied the profile to the virtual server, I was then able to apply the iRule to the virtual servers. is there any thing unique I would need to define in the profile?

     

     

    Sorry I am asking so many questions, I have never seen an F5 until two weeks ago.

     

     

    Gary
  • After I applied the profile, with the default settings, the iRule worked great. I have alot to learn. Thanks for all the help.

     

     

    Gary
  • After I applied the profile, with the default settings, the iRule worked great. I have alot to learn. Thanks for all the help.

     

     

    Gary
  • Welcome to the world of F5 Gary.

     

     

    No just the defaults on the http profile will be enough to begin with.

     

     

    Regards

     

     

    Kevin