title: How can I make these .htaccess rules work together?
body: <p>For reasons beyond the scope of this question I need to have WP in the root of my domain, <code>example.com</code>. However, <code>example.com</code>is already mapped to my live site, which is actually stored in the subdirectory <code>example.com/livesite</code>. Currently I'm using .htaccess to point <code>Example.com</code> to that subdirectory; however, WP has its own set of .htaccess rules that will screw up that redirecting if I include them. The rules are necessary for WP to work, however, as I'm using a multi-site install and the subsites are inaccessible without the appropriate .htaccess rules.</p>
  
  <p>The .htaccess I'm currently using:</p>
  
  <pre><code>RewriteEngine on
  RewriteRule ^(wp-(content|admin|includes)|site1|site2|site3) - [L]
  RewriteCond %{HTTP_HOST} ^(www.)?example.com$
  RewriteCond %{REQUEST_URI} !^/example/
  RewriteCond %{REQUEST_FILENAME} !-f 
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ /example/$1
  RewriteCond %{HTTP_HOST} ^(www.)?example.com$ 
  RewriteRule ^(/)?$ example/index.php [L]
  </code></pre>
  
  <p>The .htaccess I need to safely integrate into that one:</p>
  
  <pre><code>RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  
  # add a trailing slash to /wp-admin
  RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
  
  RewriteCond %{REQUEST_FILENAME} -f [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^ - [L]
  RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
  RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
  RewriteRule . index.php [L]
  </code></pre>
  
  <p>So far the closest I've come to getting these two to work together is the second line of the .htaccess I'm currently using; however, all that does is get me access to the admin side for the primary WP blog. The other blogs remain inaccessible. </p>
  
  <p>How can I integrate these two .htaccess rules so that <code>example.com</code> still points to <code>example.com/livesite</code>, AND all WP-related URLs will pass through and return the expected pages?</p>