Forum Discussion

jondyke_46152's avatar
Icon for Nimbostratus rankNimbostratus
Feb 02, 2012

rewrite uri and redirect to https

Folks - I seem to be struggling with getting an irule working which does the following:-



If a client hits I want him to end up at and go to the same IP address in DNS.



There are two VS setup for one for port 80 and another for port 443



I have tried a variety of irules but I am not having much success.



Any pointers would be helpful.
















2 Replies

  • can you try something like this?

    [root@ve1023:Active] config  b virtual bar list
    virtual bar {
       ip protocol 6
       rules myrule
       profiles {
          http {}
          tcp {}
    [root@ve1023:Active] config  b rule myrule list
    rule myrule {
       when HTTP_REQUEST {
            if {[string tolower [HTTP::host]] equals ""}{
                    HTTP::redirect "https://www.[HTTP::host][HTTP::uri]"
    [root@ve1023:Active] config  curl -I
    HTTP/1.0 302 Found
    Server: BigIP
    Connection: Keep-Alive
    Content-Length: 0
  • Thanks for that, it worked a treat. I was trying to get far too complicated - sometimes the solution is right in front of you!