title: .htaccess: Redirect pages if not accessed within subdomain
body: <p>Scenario:</p>
  
  <pre><code>Main domain domain.com points to */home/domain/www*
  Addon domain addon.com points to */home/domain/www/addon/www*
  </code></pre>
  
  <p>Question: How do I do the following:</p>
  
  <pre><code>http://addon.domain.com instead of http://domain.com/addon
  http://addon.domain.com/page.html instead of http://domain.com/addon/page.html
  </code></pre>