Forum Discussion
Yannick_385905
Mar 22, 2019Nimbostratus
Backslash in STREAM::expression
Hello,
I have some trouble to replace every occurence that match something like 'http:\/\/site.sub.domain.com' by 'https:\/\/site.domain.com'.
My irule looks like the following :
when HTTP_RES...
- Mar 26, 2019
Resolved, it work with this syntaxe :
STREAM::expression {@http:\\/\\/site.sub.domain.com@https:\/\/site.domain.com@ @http://site.sub.domain.com@https://site.domain.com@}
youssef1
Mar 22, 2019Cumulonimbus
Hi Yannick,
You don't need backslash:
https://devcentral.f5.com/questions/basic-http-stream-profile
did you try just:
when HTTP_RESPONSE {
if { [HTTP::header value Content-Type] contains "text" } {
STREAM::disable
STREAM::expression {@http://site.sub.domain.com@https://site.domain.com@}
STREAM::enable
}
}
You can also a rewrite profil instead stream profil... Did you test it? please see my response in this post:
https://devcentral.f5.com/questions/intenal-server-responds-internal-url-to-external-clients-60392
Regards
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