Kemp Support, how can we help?

The latest application delivery knowledge and expertise at your fingertips.

How to Modify a Root URL to redirect to a Specific Directory URL

Typically, it is better to configure this sort of redirect on your Real Servers, however you can use header modification to achieve the same result. To do this, follow the steps below in the LoadMaster Web User Interface (WUI):

  1. In the main menu, select Rules & Checking and Content Rules.
  2. Click Create New.
  3. Use the following settings for the rule.

    Rule Name: Rewrite_Root
    Rule Type: Modify URL

    Match String: ^/$
    Modified URL: /redirect/to

  4. Click Create Rule.
  5. In the main menu, select Virtual Services and View/Modify Services.
  6. Click Modify on the relevant Virtual Service.
  7. Expand the Advanced Properties section.
  8. Click Show Header Rules.
  9. In Request Rules, select the relevant rule and click Add.

By matching “/” and rewriting it to the desired value, you can force requests to a certain resource or directory.


Comments

Avatar

Robert Starzynski

But how to match only root of a specified domain, let say webmail.domain.com but not test.domain.com?

0

Avatar

Max Broomfield

Robert Starzynski 

To do this to a subdomain (test.domain.com) you would go into Its SubVS, open Advanced Properties and add the header rule there

0

Avatar

Robert Starzynski

Thank you for your answer, still have some issues. Let's say following situation.

1 Virtual IP and on that few SubVS like

chalie.domain.com to X server
delta.domain.com to Y server
mail.domain.com/owa to Z server
mail.domain.com/ecp to Z server
and so on....

On the main VIP content switching is enabled and rule precedence configured so every forwarding is working correctly.
Now what I wan't to achieve is the if the client puts url mail.domain.com, he is automatically being redirected to mail.domain.com/owa. Currently if the user enters mail.domain.com/owa he gets Kemp Login window - this is the expected behavior. If he enters only mail.domain.com, he gets "access denied" reply, and no redirect to /owa.

If I add a header rule to Exchange 2010 HTTPS Offloaded with ESP - OWA SubVS it is still not working, but maybe, because there are few other Exchange SubVS, which don't have the header rule? Or do I need to specify somewhere, in what order the Exchange SubVS are evaluated? Or maybe that's not possible at all and I need for OWA different domain like webmail.domain.com?

0

Avatar

Robert Starzynski

Renard, thank you for contacting me directly and solving the problem. Your help is very appreciated.

1