Forum Discussion
need some help on a host rewrite iRule.
Folks,
We have a VIP "xyz.mycompany.com" configured to listen on https. The SSL profile configured also has the certificate for hostname "xyz.mycompany.com".
However few folks still access this with the old hostname "abc.mycompany.com" for which the certificate hostname does not exist and hence is giving out an error.
Our goal is to allow our clients to use the old hostname and still get redirected to the new hostname with any SSL errors. Will the below iRule suit our requirement?
Will end users understand that something has changed?
when HTTP_REQUEST { if { [HTTP::host] eq "abc.mycompany.com" } { HTTP::header replace "Host" "xyz.mycompany.com" } }
Thanks!!
1 Reply
- cjunior
Nacreous
Hi, I think is better redirect the client to the new host name, but that does not solve the certificate error on the first access to the old host.
Change the content header in the http request will only take effect to the server side. So, why do you not create a VS:80 and also redirects to? I think most people first goes to http instead of https.for both HTTP and HTTPS when HTTP_REQUEST { if { [HTTP::host] ne "xyz.mycompany.com" } { HTTP::redirect "https://xyz.mycompany.com[HTTP::uri]" } }Hope it helps.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com