title: Mod ReWrite Catch-All Subdomain
body: <p>Basically I want *.domain.com to pull up domain.com/*/ (not redirect).</p>
  
  <p>I went into the subdomains section of cPanel and set a wildcard for this domain. It appears to be resolving correctly, ie *.domain.com is bringing up domain.com.</p>
  
  <p>I've now made a htaccess file in the public_html directory containing:</p>
  
  <pre><code>Options +FollowSymLinks
  Options +Indexes
  RewriteEngine On
  RewriteBase /
  RewriteCond %{HTTP_HOST} !www.domain.com$ [NC]
  RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+).domain.com [NC]
  RewriteRule (.*) %2/$1 [L]
  </code></pre>
  
  <p>The error I'm getting is '500 Internal Server Error', any ideas?</p>