generic iRULE to only replace links which have .subdmain.com from http to https
Hi All,
I am newbie on iRule and F5 and still learning about it. I had an issue lately and want to get more ideas that could help.
Problem:
I have an iRULE to change any http to https using stream::expression {@http@https@}. But, when get a webservice response the link referencing 'http://schemas.xmlsoap.org/' is changed to https. And thats makes it an invalid link and raise an application exception as the application expects 'http://schemas.xmlsoap.org/' not https.
I've tried this but didn't work STREAM:EXPRESSION {@http://(.{1,9}.subdomain.com)@https://\1@} but it didn't work(my URL changed from http://client1.subdomain.com to https://\1) because it seams that stream expression doesn't accept backrefrence (to call back the string matched by the regexp in the parenthesis). I am trying to make a generic rule as we have couple of clients and don't want to make a rule of each client (the link to the application would be e.g client1.subdomain.com).
I've tried to only omit schemas.xmlsoap.org by using the following expression: STREAM:EXPRESSION {@http://(?!schemas.xmlsoap.org)@https@} but it didn't work neither and every thing have change to https even https://schemas.xmlsoap.org.
Any ideas and suggestion are appreciated.
May be can try this:
STREAM::expression {@http://@https://@ @http://schemas@http://schemas@}