I do have a clientssl profile on my virtual server if that will help. Please help.
I could just create a site in IIS with the old domain name and cert and make it an absolute redirection to the new site … however, I want to figure this out!
I am not offloading SSL to the Virtual server. I have a clientssl profile that is used for decrypting traffic for redirecting to a maintenance page ihat is running on PORT 80 in the event that no pool members are available (the pool members are configured for 443 in the pool). Thus, not offloading SSL.
BUt thanks for your reply, sorry that I didnt make that evident.
Any more ideas!?!? As always appreciate the help. I have never had a question or issue go unaswered.
If you want to inspect or interact with the HTTP for an HTTPS VIP, you’ll need to add a client SSL profile and leave the SSL filter enabled. Bhattman’s rule should work fine for this. Though the URI should never be a null string. HTTP user-Agents must set the URI to at least / even if the user doesn’t do this.
Ok I get what you guys are laying down now. I created the iRule and its the only iRULE on my HTTPS VIP, but now all traffic just hangs. The browser just churns and churns when I apply this iRULE. The code is below. Even if you put the exact URL for the new domain I want to preference. However, as soon as I go onto the VIP and remove this iRULE the browser immediately pops up the site.
What am I doing wrong?
Thanks guys. Dave
when HTTP_REQUEST {
if { [HTTP::host] == "olddomainname" } {
HTTP::redirect "https://newdomainname[HTTP::uri]" }
}
If the VIP has a client SSL profile enabled and the pool members are expecting HTTPS, you’d either want to change the servers to listen on port 80 for HTTP and change the pool configuration or add a server SSL profile to the VIP to have LTM re-encrypt the serverside traffic.
Adding the Server SSL profile did it! I always wanted to offload SSL for the site in question, but the developers didnt want to for fear that someone could set their local host file to IP of server and access site on HTTP if they were on our internal network. Stupid since we run Cisco NAC here and any outsiders would be isolated to restricted VLAN. Anyway …
You can detect the target domain with [HTTP::host] and the perform a redirect.
This is a 302 - Temporary Redirect. If you want a 301 - Permanent then you will need to change it to HTTP::respond 301 Locaton “https://www.website.com”
when HTTP_REQUEST {
if { [HTTP::host] eq "site1.com" } {
HTTP::redirect "https://mysite.com"
}
}