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):
- In the main menu, select Rules & Checking and Content Rules.
- Click Create New.
- Use the following settings for the rule.
Rule Name: Rewrite_Root
Rule Type: Modify URL
Match String: ^/$
Modified URL: /redirect/to - Click Create Rule.
- In the main menu, select Virtual Services and View/Modify Services.
- Click Modify on the relevant Virtual Service.
- Expand the Advanced Properties section.
- Click Show Header Rules.
- 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
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
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?
Renard, thank you for contacting me directly and solving the problem. Your help is very appreciated.
Robert Starzynski
But how to match only root of a specified domain, let say webmail.domain.com but not test.domain.com?