Forum Discussion
Jeff_Morrison_4
Nimbostratus
Dec 14, 2005Using 80 port for redirection
I have created several Virtual Servers using the same IP and different ports.(80, 4443) When I use the below iRule and set the port redirection to port 4443 all works correctly, however if I use port 80, the rule fails to inject the new port 80 into the URL, but it will inject port 4443 into the URL.
The reason I want to use port 80, is because it is a well known port and won't get blocked by firewalls.
when HTTP_REQUEST {
if { [HTTP::uri] contains "/CMFCU"} {
pool Prod_7001
} elseif { [HTTP::uri] contains "/Customer1"
or [HTTP::uri] contains "/Customer2
or [HTTP::uri] contains "/Customer3" }{
HTTP::redirect https://[HTTP::host]:80[HTTP::uri]
} else {discard}
}
- unRuleY_95363Historic F5 AccountCould this be a client browser problem. Everything your doing looks ok.
- Vincent_Power_9
Nimbostratus
The standard port for https is 443, and most corporate firewalls allow it to pass.when HTTP_REQUEST { if { [HTTP::uri] contains "/CMFCU"} { pool Prod_7001 } elseif { [HTTP::uri] contains "/Customer1" or [HTTP::uri] contains "/Customer2 or [HTTP::uri] contains "/Customer3" }{ HTTP::redirect https://[HTTP::host][HTTP::uri] } else {discard} }
virtual webmail-redirect { destination 1.2.3.4:http snat automap ip protocol tcp profile http tcp rule webmail-redirect }
- unRuleY_95363Historic F5 AccountAnother thing I'll add is that you can normally send https traffic to a server listening on port 80. The server will need to be configured for encrypted traffic on port 80 (usually https traffic goes to port 443). Otherwise, the server will try to treat the data as an HTTP request - and it will undoubtably not look like any request your server has ever seen before...
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects