title: How to prevent 500 Error for multiple subdomain rewrite rules?
body: <p>In my .htacccess-file, I have two rewrite rules but can't get both working properly. Here is the code:</p>
  
  <pre><code>RewriteCond %{HTTP_HOST} ^admin.example.com [NC]
  #RewriteRule ^administration/ - [L]
  RewriteRule (.*) administration/$1 [L]
  
  RewriteCond %{HTTP_HOST} ^example.com [NC] 
  RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
  </code></pre>
  
  <p>The above code results in this:</p>
  
  <ul>
  <li>admin.example.com - 500 Internal Server Error</li>
  <li>example.com - Works fine</li>
  </ul>
  
  <p>But if I uncomment the second line and run <code>RewriteRule ^administration/ - [L]</code>, the result is:</p>
  
  <ul>
  <li>admin.example.com - Works fine</li>
  <li>example.com - 500 Internal Server Error</li>
  </ul>
  
  <p>I'm actually not sure about what the second line actually doing. I'm not so good at htaccess rewrite coding. I found that line from <a href="https://stackoverflow.com/questions/9521979/subdomain-redirection-with-htaccess-and-a-500-internal-server-error">another question here on Stackoverflow</a>.</p>
  
  <p>And about the 500 error, I thought it caused by an infinite loop. But can't really see how it could appear by my code. So would really like to get that explained.</p>
  
  <p>So, I would really like to get answers to this:</p>
  
  <ol>
  <li>What does line 2 means, especially the "-" character there?</li>
  <li>And what causes the 500 error?</li>
  </ol>