<HTML>
<HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META content="OPENWEBMAIL" name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>

<font size="2">I have a site that has numerous web aliases and I would like to redirect each one to a different sub-directory based on the URL.   I have unchecked the web alias redirect box in the GUI so that each alias is kept in the browser.   I have added the following the /etc/httpd/conf/vhosts/site19.include  file so that I can use a .htaccess file in the /web directory:
<br />
<br /><Directory "/home/.sites/123/site19/web">
<br />   AllowOverride All
<br />   Options All
<br /></Directory>
<br />
<br />Now I am attempting to put a .htaccess file to redirect based on the URL but I am stuck.   My .htacess file looks like this:
<br />
<br />RewriteEngine on
<br />RewriteCond %{HTTP_HOST} ^example\.com$
<br />RewriteRule (.*) http://www.example.com/$1 [R=301,L]
<br />RewriteRule ^$ sub1 [L]</font>
<br /><font size="2"><font size="2">
<br />RewriteCond %{HTTP_HOST} ^mydomain\.com$
<br />RewriteRule (.*) http://www.mydomain.com/$1 [R=301,L]
<br />RewriteRule ^$ sub2 [L]</font>
<br />
<br />I am expecting that only example.com will now be redirected to example.com/sub1 and mydomain.com would be redirected to mydomain.com/sub2
<br />When I test it, everything gets redirected to example.com/sub1
<br />
<br />What am I missing or is there a better way to accomplish this task?
<br />
<br />Dan Porter 

<br />
Twin Wolf Technology Group, LLC 

<br />

<br />
</font>

</BODY>
</HTML>