Forum Discussion
tidenz_92110
Feb 08, 2012Nimbostratus
Stream Expression
Hi guys,
having an issue when using a stream profile and expression
STREAM::expression {@/$TEXT/static-@https://abc/$TEXT/static@ @\.\./static@https://abc/static@}
so if ...
nitass
Feb 08, 2012Employee
Now i know if i use curly braces then the variable wont work but if i go the other way so use quotes "" instead then the second pair breaks.what was broken?
this is mine.
[root@ve1023:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.79:80
ip protocol 6
rules myrule
profiles {
http {}
stream {}
tcp {}
}
}
[root@ve1023:Active] config b pool foo list
pool foo {
members 200.200.200.101:80 {}
}
[root@ve1023:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
STREAM::disable
HTTP::header remove "Accept-Encoding"
}
when HTTP_RESPONSE {
set TEXT "test"
if {[HTTP::header value Content-Type] contains "text"}{
STREAM::expression "@/$TEXT/static-@https://abc/$TEXT/static@ @\.\./static@https://abc/static@"
STREAM::enable
}
}
}
[root@ve1023:Active] config curl http://200.200.200.101/test.html
...
this is host 101.
...
/test/static-abc
../staticabc
...
[root@ve1023:Active] config curl http://172.28.19.79/test.html
...
this is host 101.
...
https://abc/test/staticabc
https://abc/staticabc
...
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