Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am migrating to a new reseller hosting plan. By default, they expect me to create a new cPanel account for every domain I add but this would be hugely inconvenient.

So I setup my addon domains in the following fashion:


The problem is, my Default domain in the account points to /public_html/ and cannot be changed by conventional methods.

I created a .htaccess file with the following data:

Rewrite Engine On
Rewrite Rule ^$ / [R=301,L]

The only problem is that it redirects to:

How can I force it to use the subfolder but not show it in the finished URL?

share|improve this question

marked as duplicate by HopelessN00b, HBruijn Feb 24 at 19:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

I'm not sure I really got what you mean, but this sounds more like a job for VirtualHosts and DocumentRoot or maybe VirtualDocumentRoot which lets you do things like:

<VirtualHost *>
  UseCanonicalName off
  ServerAlias *.mydomain*.com
  VirtualDocumentRoot /public_html/%2/%1
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.