Forum Discussion
kmtmt_51646
Nimbostratus
Apr 17, 2012change http:/ links to https:/ except a certain URL
Hi all,
Servers have HTML links with a href tag with "http:" so I use stream iRules to change them to "https:" but now I need to not change it for a certain URL.
I'd like to do:
1) check server re...
nitass
Employee
Apr 17, 2012can you try something like this?
[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
}
when HTTP_RESPONSE {
if {[HTTP::header value Content-Type] contains "text"}{
STREAM::expression {@http://www.no-change.com/@http://www.no-change.com/@@http://@https://@}
STREAM::enable
}
}
}
[root@ve1023:Active] config curl http://200.200.200.101/test.html
...snipped...
http://www.no-change.com/something
http://www.change.com/something
...snipped...
[root@ve1023:Active] config curl http://172.28.19.79/test.html
...snipped...
http://www.no-change.com/something
https://www.change.com/something
...snipped...
LTM stream profile: Multiple replacements & regular expressions by Deb
https://devcentral.f5.com/Tutorials/TechTips/tabid/63/articleType/ArticleView/articleId/101/LTM-stream-profile-Multiple-replacements-regular-expressions.aspx
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