The Web server is behind a load balancer . I'am doing a HttpResponse.Redirect("anotherpage") . Will this redirect again go through the load balancer ? I'm confused as this is a serverside redirect , and not a redirect from the client .
I want to know this to determine if the redirected url is served by a different web server as determined by the load balancer .
If you're using an Application Load Balancer as part of your configuration, you can use it to redirect one domain to another: Open the Amazon Elastic Compute Cloud (Amazon EC2) console. On the navigation pane, choose Load Balancers under Load Balancing.
Classic Load Balancers can't redirect HTTP traffic to HTTPS by default. Instead, configure your rewrite rules for the web servers instances behind the Classic Load Balancer. You must configure your rewrite rules to use the X-Forwarded-Proto header and redirect only HTTP clients.
Select a load balancer, and then choose HTTP Listener. Under Rules, choose View/edit rules. Choose Edit Rule to modify the existing default rule to redirect all HTTP requests to HTTPS.
A listener is a process that checks for connection requests. It is configured with a protocol and a port for front-end (client to load balancer) connections, and a protocol and a port for back-end (load balancer to back-end instance) connections. Elastic Load Balancing supports the following protocols: HTTP.
HttpResponse.Redirect is not actually a server-side redirect. Setting this in the Response stream actually sends a 302 "Moved Temporarily" response to the browser, instructing it to try another URL ("anotherroute").
In case you do not want that behavior, you can use Server.Transfer(url); There is a good explanation about it here: http://www.developer.com/net/asp/article.php/3299641/ServerTransfer-Vs-ResponseRedirect.htm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With