title: Dynamic subdomain rewrite htaccess
body: <p>First of all - I've read a lot of similar questions but nothing worked for me.</p>
  
  <p>These are the rewrite rules:</p>
  
  <pre><code>RewriteCond %{HTTP_HOST} ^([^/.]+)\.example\.com$ 
  RewriteRule ^ index.php?user=%1 [L]
  </code></pre>
  
  <p>It works fine but it's not exactly what I want. I'm running a MVC framework like kohana where the url structure looks like this:</p>
  
  <pre><code>example.com/controller/action/parameter
  </code></pre>
  
  <p>but when I try the following rewrite I'm getting an internal server error:</p>
  
  <pre><code>RewriteCond %{HTTP_HOST} ^([^/.]+)\.example\.com$ 
  RewriteRule ^ index.php/user/view/%1 [L]
  </code></pre>
  
  <p>So, how can I fix this?</p>