non standard port
1 TopicRedirect Rewrite not working - how write an irule to redirect non-standard port
Simple port change, just not sure which path to take. I have a virtual server that is listening on 443. It redirects to a server on the backside that is listening on http (not SSL) via port 10108. When users are clicking around this server there are links that are taking them to http://URL.EXAMPLE.COM:10108. In the past I've always applied an HTTP profile and just did rewrite redirect to "all". But for some reasons it's not catching this one. So I'm trying to write an irule that says ...when an http request comes in for 10108 go ahead and take the 10108 off and redirect it to https. I think that for this to work I would have to first create virtual server to listen on 10108...which I don't really want to do. So my question(s) are as follows: why isn't redirect rewrite working? Isn't that the entire point of that command if I want to just redirect these inbound requests do I need to have a server listening on 10108 (pretty sure that is a yes...otherwise my understanding of traffic flow is completely off) What irule command do I use to replace just the port? I believe that the HTTP::header contains the port. I don't think that the port is contained in the URI or in the PATH, so do I need to replace the header with the stripped off port number? To maintain the rest of the URI do I need to first save that as a variable and then add it back in? when HTTP_REQUEST { if {[HTTP::header] contains "10108" HTTP::header replace Host "URL.EXAMPLE.COM" HTTP::redirect https://[HTTP::host]/HTTP::uri } ...that certainly doesn't look right, so any help would be appreciated.Solved519Views0likes3Comments