Forum Discussion
kj07208_118528
Cirrus
Aug 26, 2015(Urgent) iRule for Http to Https on non-standard port
I have a web site that only takes requests on port 99 (I have no control over this).
In the web page the developers have hardcoded http links (once again no control :( ).
I also have a APM applicati...
Kevin_Stewart
Employee
Aug 27, 2015You can use a rewrite profile or a STREAM iRule, but ultimately you have to catch these bad URLs in server responses and rewrite them to match the external FQDN.
when HTTP_REQUEST {
HTTP::header remove Accept-Encoding
STREAM::disable
}
when HTTP_RESPONSE {
if { ( [HTTP::header exists Location] ) and ( [HTTP::header Location] contains ":99" ) } {
HTTP::header replace Location "https://someapp.corp.com/"
}
if { [HTTP::header Content-Type] contains "text" } {
STREAM::expression {@http://someapp.corp.com:99@https://someapp.corp.com@}
STREAM::enable
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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