Web Development

Redirect primary domain to a subfolder using .htaccess

I recently switched hosting from Dreamhost to Lithium Hosting – seems like a solid switch so far. Migrating hosts is certainly frustrating especially since Dreamhost uses a proprietary cPanel. A particular issue is that I like to keep all of my domains in subdirectories of public_html. Dreamhost does this automatically, even with your root domain, but I believe that’s not the norm. However, you can make it happen with the following code in pubic_html/.htaccess: