title: htaccess redirect subdomain to domain
body: <p>there are a lot of posts related to this topic. but finding one exactly the same will take a lot of time. so Ill just simply ask agian if this has been asked before. </p>
  
  <p>I would like to redirect a url like this "somename.mysite.com" to a url like "mysite.com/test/somename". notice the "somename" is a daynamic value, how can I write the rewrite_rule in htaccess?</p>
  
  <p>in htaccess file there is already something:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>where do I place the answer you give me.</p>
  
  <p>Thank you for any help in advance. </p>