"Fail on Match" rule for client redirection

The "Fail on Match" rule can be used to redirect a client to a desired URL. When the rule is matched, the client request will fail and be redirected to the URL specified under the Not Available Redirection Handling feature.


To do this, follow the instructions below in the LoadMaster Web User Interface (WUI):

  1. In the main menu, go to Rules & Checking > Content Rules.
  2. Click Create New.
  3. Fill out the fields as follows:
    • Rule Name: <RuleName>
    • Rule Type: Content Matching
    • Match Type: Regular Expression
    • Header Field: <LeaveBlank> (the URL is the default)
    • Match String: <URLRequestedByClient> (for example /oldurl)(Alternatively, if the option to Include Host in URL is enabled, the format https://www.example.com/oldurl can be used.)
    • Fail On Match: Enabled
  4. Click Create Rule.
  5. Go to Virtual Services > View/Modify Services.
  6. Click Modify on the relevant Virtual Service.
  7. Expand the Advanced Properties section.
  8. Click Show Selection Rules.
  9. Select the new rule from the drop-down menu.
  10. Click Add.
  11. Click Back.
  12. Select 302 Found from the Error Code drop-down menu.
  13. In the Redirect URL text box, enter the URL that the client will be redirected to, for example https://www.example.com/newurl)
  14. Click Set Redirect URL.
Was this article helpful?

2 out of 2 found this helpful