title: Moving Wordpress site to /blog domain
body: <p>I have a client with a wordpress site located on example.com, however, they want a custom website on example.com and the blog moving to example.com/blog</p>
  
  <p>So far I have created two folders in the root directory</p>
  
  <pre><code>/main
  /blog
  </code></pre>
  
  <p>In the virtual host, I have an Alias for the blog</p>
  
  <pre><code>Alias /blog /var/www/public_html/blog
  </code></pre>
  
  <p>The main site is located in the /main folder and everything seems to be working fine. The wordpress site has been moved to the /blog folder and when I goto /blog it does indeed load up.</p>
  
  <p><strong>Two problems</strong></p>
  
  <p>1) Style sheets aren't loading for the wordpress site. In the source they appear to be example.com/wp-content/... rather than example.com/blog/wp-content/...</p>
  
  <p>2) Links appear correct but don't goto the desired place. For example a category named clothing appears as example.com/blog/category/clothing/ but when clicked redirects to example.com</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>In wp-options table I updated the siteurl and home values to include the /blog This is solved issue 1. Issue 2 remains.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>The problem appears to be with the Virtual Host Alias. /blog catches and goes to the public_html/blog folder, /blog/anything doesn't catch and goes to the /main folder. </p>
  
  <p><strong>UPDATE AND SOLUTION</strong></p>
  
  <p>The problem was with the .htaccess within the wordpress site.</p>
  
  <p>This is the original .htaccess</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
      RewriteBase /
      RewriteRule ^index\.php$ - [L]
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule . /index.php [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>This is a modification that works</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
     RewriteEngine on
      RewriteBase /blog
      RewriteRule ^index\.php$ - [L]
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule    (.*) index.php [L]
  &lt;/IfModule&gt;
  </code></pre>