Forum Discussion

Phil_53695's avatar
Phil_53695
Icon for Nimbostratus rankNimbostratus
Jul 08, 2011

irule to redirect old https URL to new one.

I need to use a redirect to send any traffic that might come into an old https url to the new https url.

 

I believe in order to do that, the cert might need to terminate on the ltm vip.

 

2 Replies

  • Do the two FQDNs resolve to the same IP address? If so, do you have a cert which is valid for both hostnames? If you do it would be fairly simple to redirect any request that isn't to the new FQDN to the new FQDN.

    If you don't have a single cert valid for both FQDNs you could change the IP address one of them resolves to.

    when HTTP_REQUEST {
       if {[string tolower [HTTP::host]] ne "new.example.com"}{
          HTTP::respond 301 Location "http://new.example.com[HTTP::uri]"
       }
    }
    

    Aaron