Forum Discussion
Need to Redirect HTTPS Request to Another HTTPS Request
Hello,
I need to do the following:
Redirect https://www.whatever.com to https://www.suntin-else.com ... I cannot find an iRule to do this. It is easy to do the HTTP to HTTPS, but I could not find a way in the forums to do what I need to do.
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!
Any ideas?
thanks
Dave
- The_Bhattman
Nimbostratus
Hi Dave,when HTTP_REQUEST { if { ([HTTP::host] eq "www.whatever.com") and ([HTTP::uri] eq "") } { HTTP::redirect "https://www.suntin-else.com" } }
- Dbow_21284
Nimbostratus
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. - hoolio
Cirrostratus
Hi Dave, - Dbow_21284
Nimbostratus
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.
when HTTP_REQUEST { if { [HTTP::host] == "olddomainname" } { HTTP::redirect "https://newdomainname[HTTP::uri]" } }
- hoolio
Cirrostratus
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. - Dbow_21284
Nimbostratus
Boom! - Luis_Carlos_101
Nimbostratus
guys, - Luis_Carlos_101
Nimbostratus
guys, - Michael_Yates
Nimbostratus
You can detect the target domain with [HTTP::host] and the perform a redirect.when HTTP_REQUEST { if { [HTTP::host] eq "site1.com" } { HTTP::redirect "https://mysite.com" } }
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