Forum Discussion
Tony_Hobson_189
Mar 21, 2017Nimbostratus
STREAM::expression Not Replacing Multiple Expresions
Hello - Hope you can help me. I'm using STREAM in an iRule to replace internal server names with external ones using vars and also to change http to https. It works if I using either one of the elements by themselves, but if I put them together in a single STREAM expression, only the http replacement works.
Here is the iRule:
when CLIENT_ACCEPTED {
set sINTERNAL_URL "internal.server"
set sEXTERNAL_URL "external.com"
}
when HTTP_REQUEST {
STREAM::disable
}
when HTTP_RESPONSE {
if { [HTTP::header Content-Type] starts_with "text/" }{
STREAM::expression "@://${sINTERNAL_URL}@://${sEXTERNAL_URL}@ @http://@https://@"
STREAM::enable
}
}
Any ideas?
Thanks
'://' was matching on both.
Try this:
STREAM::expression "@${sINTERNAL_URL}@${sEXTERNAL_URL}@ @http://@https://@"
- kunjan_118660Cumulonimbus
'://' was matching on both.
Try this:
STREAM::expression "@${sINTERNAL_URL}@${sEXTERNAL_URL}@ @http://@https://@"
- Tony_Hobson_189Nimbostratus
Awesome - Thanks
- kunjanNimbostratus
'://' was matching on both.
Try this:
STREAM::expression "@${sINTERNAL_URL}@${sEXTERNAL_URL}@ @http://@https://@"
- Tony_Hobson_189Nimbostratus
Awesome - Thanks
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