Redirect primary domain to a subfolder using .htaccess

Posted April 29, 2013 in Web Development


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:

Comments

What do you think? Do you have any questions, thoughts, or related links to share? Did I make a mistake in my post?

Submit a Comment