title: Using .htaccess to redirect subdirectory and contents to subdomain
body: <p>I want to take some subdirectories I have on a single domain and redirect them to a subdomain that matches the subdirectories name.</p>
  
  <p>Fore example if I have:</p>
  
  <p><a href="http://mysite.com/books" rel="nofollow">http://mysite.com/books</a><br />
  <a href="http://mysite.com/games" rel="nofollow">http://mysite.com/games</a><br />
  <a href="http://mysite.com/another" rel="nofollow">http://mysite.com/another</a></p>
  
  <p>And if each of those subdirectories will have files, folder, etc beneath them:</p>
  
  <p>ex: <a href="http://mysite.com/books/fiction/bookname" rel="nofollow">http://mysite.com/books/fiction/bookname</a></p>
  
  <p>I want to be able to access those items and the items within them like so:</p>
  
  <p><a href="http://books.mysite.com" rel="nofollow">http://books.mysite.com</a><br />
  <a href="http://books.mysite.com/fiction/bookname" rel="nofollow">http://books.mysite.com/fiction/bookname</a></p>
  
  <p>Same for any other items I may define like:</p>
  
  <p><a href="http://games.mysite.com" rel="nofollow">http://games.mysite.com</a><br />
  <a href="http://whatever.mysite.com/afolder/more/content" rel="nofollow">http://whatever.mysite.com/afolder/more/content</a></p>
  
  <p>I believe I can do this with .htaccess but I'm not entirely sure on the correct code or how to have it cover all the items within the folder. I could figure out how to do each individual item manually, but that wouldn't be helpful since I'd have to do it for hundreds of urls.</p>
  
  <p><strong>EDIT</strong>: <em>To expand more on my setup and goal</em> - </p>
  
  <p>I tried the answer of directing the domain to point to the subdirectory when setting up the domain, but it doesn't work.</p>
  
  <p>Here is more info on how my site is setup. On the main domain is WordPress set up as a WordPress MU install. I KNOW that I can set this up using subdomains with a wildcard entry to my DNS to save myself this headache, BUT my host doesn't allow it and would require me to buy a private server, which I'm not interested in right now since this is more of a test/personal project than anything else and wouldn't garner enough attention/traffic. </p>
  
  <p>So, I've set up WordPressMU to create subdirectories for each of the new sites I add. Right now I have 5 total. The main site (which will be for presenting updates from the four other subsites), and then four subject specific sites. I want the sites to be able to be accessed and browsed by their subdomain, and not the subdirectories. So I really think .htaccess is the route I would have to take since I can't set up my subdomain to point to a directory that doesn't really exist.</p>
  
  <p>PS Thanks in advance for any/all help and suggestions. It is really appreciated.</p>