title: htaccess RewriteBase
body: <p>I have two directories in my root: <code>/dev</code> and <code>/live</code>.</p>
  
  <p>All content inside these directories have relative paths such as <code>/css/style.css</code> or <code>/js/home.js</code>.</p>
  
  <p>I want to be able change the root directory using htaccess so that the relative paths would become <code>/live/css/style.css</code> etc or <code>/dev/css/style.css</code> depending on which version of the site I was using.</p>
  
  <p>I have tried using the following code in .htaccess located inside the <code>/live</code> directory:</p>
  
  <pre><code>RewriteEngine on
  RewriteBase /live/
  </code></pre>
  
  <p>I have also tried using <code>RewriteBase /public_html/live/</code>.</p>
  
  <p>But, the content paths are still <code>http://domain.com/css/style.css</code> rather than <code>http://domain.com/live/css/style.css</code> when I view the site.</p>
  
  <p>Has anyone any ideas?</p>
  
  <p>Thank you.</p>
  
  <p>EDIT>>
  Sorry I should explain that my root htaccess has the following rules pointing towards the two directories:</p>
  
  <pre><code>RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC]
  RewriteCond %{HTTP_HOST} ^((www\.)?([a-z]+)\.)domain\.com [NC]
  RewriteRule ^((www\.)?([a-z]+)\.)domain\.us$ /live/index.php?tag=%3 [L,P]
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC]
  RewriteCond %{HTTP_HOST} ^dev.((www\.)?([a-z]+)\.)domain\.com [NC]
  RewriteRule ^((www\.)?([a-z]+)\.)domain\.us$ /live/index.php?tag=%3 [L,P]
  </code></pre>