Hello all, I have a question about Redirecting. I have two VIPs and each has its own URL. I want one to redirect to the other under certain cconditions but I dont want the URL to change hosts. For instance…
If you want to hide the change in hostname from the client you would want to rewrite the Host header value and potentially select a different pool to send the requests to. You wouldn’t want to send a redirect back to the client as this will update the address bar and the client will see the change. Is there a separate pool that serves content for mydomain2.com? Or is it the same as mydomain1.com?
While it may work (for the most part) without OneConnect, it’s certainly a much better idea to enable it now instead of waiting for something to break later. Even if individual clients are only going to make requests for a single domain per connection, there are still lots of things that will reuse connections for more than one request - especially CDNs. They will often even reuse the same connection for requests from a myriad of different users.
If it’s a different pool for each host name, you’d want to use an iRule like Chris suggested. You’d probably also want to rewrite the Host header if the different pool members expect a specific hostname. You can do this with “HTTP::header replace Host newhost.example.com”.