title: Apache rewrite condition goes to infinite loop
body: <p>I have a tomcat with two application named “app1” and “app2”. 
  I have fronted Apache web server for tomcat with following v.host configuration.</p>
  
  <p></p>
  
  <pre><code>ServerName mywebapp.com
  ServerAlias mywebapp.com
  
  ProxyRequests On
  ProxyVia On
  
  &lt;Proxy *&gt;
  AddDefaultCharset Off
  Order deny,allow
  Allow from all
  &lt;/Proxy&gt;
  
  RewriteEngine On
  Options +FollowSymLinks
  
  RewriteEngine on
  RewriteCond %{HTTP_HOST} ^mywebapp.com$
  RewriteRule ^(.*)$ http://mywebapp.com/app1$1 [R=301,L]
  
  ProxyPass / ajp://localhost:8009/
  ProxyPassReverse / ajp://localhost:8009/
  </code></pre>
  
  <p></p>
  
  <p>I can access my both webapps with following URLs. </p>
  
  <ul>
  <li>mywebapp.com/app1</li>
  <li>mywebapp.com/app2</li>
  </ul>
  
  <p>I need one default redirect rule where, if user hit “<strong>mywebapp.com</strong>” it redirect to “<strong>mywebapp.com/app1</strong>”</p>
  
  <p>I have tried following one but no luck. it goes to infinite loop.</p>
  
  <pre><code>RewriteEngine on
  RewriteCond %{HTTP_HOST} ^mywebapp.com$
  RewriteRule ^(.*)$ http://mywebapp.com/app1$1 [R=301,L]
  </code></pre>
  
  <p>Can anyone plz suggest me the changes I need to do?</p>