title: Using Subdirectory as subdomain in htaccess
body: <p>I am trying to point a subfolder on my site as a subdomain. for example, i want to turn www.domain.com/test to test.domain.com. I already have some rewrites in htaccess done by developers that we used earlier in the site building process, and I'd like to be able to add this line without interfering with those. </p>
  
  <p>I've tried dozens of answers to this issue i found across the net, but none of them seemed to work and i'm not sure if it's due to my lack of knowledge of this language or if there's a conflict with something else. </p>
  
  <p>The latest lines I tried are:</p>
  
  <pre><code>RewriteCond %{HTTP_HOST} !^www.domain.tv 
  RewriteCond %{HTTP_HOST} ([^.]+).domain.tv 
  RewriteRule ^(.*)$ /var/www/www.domain.tv/test%1
  </code></pre>
  
  <p>This is my current htaccess file:</p>
  
  <pre><code> Options +FollowSymLinks
  
  RewriteEngine On
  
  RewriteBase /
  
  #RewriteCond %{HTTP_HOST} !www\.domain\.tv$ [NC]
  #RewriteCond %{HTTP_HOST} ^(.+)\.domain\.tv$ [NC]
  #RewriteRule .* index.php?option=com_contushdvideoshare&amp;view=player&amp;Itemid=33 [L]
  
  RewriteCond %{REQUEST_URI} ^/album\/t\/([a-zA-Z0-9]+) [NC]
  RewriteRule ^album/t/(.*) index.php?option=com_usermenu&amp;task=directdownload&amp;id=$1&amp;type=one$
  
  RewriteCond %{REQUEST_URI} ^/album\/([a-zA-Z0-9]+) [NC]
  RewriteRule ^album/(.*) index.php?option=com_usermenu&amp;task=directdownload&amp;id=$1 [L]
  
  
  RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
  RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
  RewriteCond %{QUERY_STRING} (&lt;|%3C)([^s]*s)+cript.*(&gt;|%3E) [NC,OR]
  RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
  RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
  RewriteRule .* index.php [F]
  
  #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  
  
  RewriteCond %{REQUEST_URI} !^/index\.php
  RewriteCond %{REQUEST_URI} (/[^.]*|\.(php|html?|feed|pdf|raw))$ [NC]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule .* index.php [L]
  </code></pre>
  
  <p>Can anyone help me here? </p>