Content rules - beginner question


I am new to KEMP's Content Rules section and having read the guide I just need a tiny bit of help

We have 2 VIPs/Services and

I am trying to set up a pair of basic rules (and they very nearly work!) on

Intended Behaviour:
A request with - do nothing to the Host or URL
A request with - change the Host to, and maintain the rest of the URL

I have set up 2 rules and it partially works

Rule Name: FolderB
Content Matching 
Type: Regex
Pattern: /^\/folderB.*
Set Flag 1

Rule Name: www1Towww
Replace Header
Pattern: /
Only if Flag 1 set

It works fine if I visit
But not if I add anything after the /FolderB, even this doesn't work

Running version:

I would really appreciate any help, thank you in advance


1 comment

Tony Vaughan

your logic looks correct, but from what you are saying the flag isn't being matched correctly

if you haven't done so already would use be able to test with Sub-VSs?

main VS (Content Match to FolderB) -> Sub VS 1 -> header modification rule to change domain
main VS (Content Match to default) -> Sub VS 2 -> no other rules

this is to make sure that the "set Flag on match" is set and that the "match on flag set" is triggered