Help with content rules and redirecting only the root of a domain


I have tried multiple ways of doing this but I have not been able to succeed in making it work properly.  We are currently handling this in apache but would like to speed it up by moving it to the load balancer.  I want to redirect all traffic to just the root of to  Any requests to directories like I want to pass through.  Both of these services are in the load balancer and being handled properly, just current the root folder request redirect is happening in apache.  Any idea on how to make this work?  Everytime I write a rule it either doesn't work or sends all traffic not just root traffic to the other service.

I am running a vlm-1000 version:

### send root url request to SharePoint
RewriteRule ^$ /index.php [PT,L,QSA]
### Check if the file exists in root ###
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
### If not rewrite to homepage ###
RewriteRule (.*) [R=301,L]


Mark Deegan

Hello Jason,

You should create a rule as the following

Rule name = Redirect_root

rule type = replace header

Header field = Host

match string = /*/

Value of header filed to be replaced =

perform if Flag set = unset


This will redirect the root and everything under it.  I need to redirect the root only and not all the folders under it. -> (redirected) (no redirection) (no redirection)





Tony Vaughan


for this scenario I would try the following,

the logic would be
if possible create two sub virtual services

the first for the root directory "/"
the second for and other paths

for send to sub VS 1 and then trigger a 302 redirect to the
for send to sub VS 2 and then to the real servers as normal

Content match for root "/"
Rule Type: Content Matching
Match Type: Regular Expression
Header field: <Blank>
Match String: /^\/$/
Ignore Case enabled

for the 302 redirect
Under subVS1 -> Advanced Properties -> Not Available Redirection Handling
Error code 302 found
Redirect URL: