title: Wordpress - Subdirectory - htaccess
body: <p>I have Wordpress installed in a subdirectory:</p>
  
  <pre><code>/public_html/blog/
  </code></pre>
  
  <p>I want to be able to access the blog like this:</p>
  
  <pre><code>http://example.com/blog
  </code></pre>
  
  <p>and posts like this:</p>
  
  <pre><code>http://example.com/blog/category/postname
  </code></pre>
  
  <p>In general settings I have the "WordPress Address (URL)" set to:</p>
  
  <pre><code>http://example.com/blog
  </code></pre>
  
  <p>Permalinks is set like:</p>
  
  <pre><code>/blog/%category%/%postname%
  </code></pre>
  
  <p>In the subdirectory (/public_html/blog/) I have an .htaccess like:</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 . /blog/index.php [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>Everything works EXCEPT for being able to access the blog Home page at:
  <a href="http://www.example.com/blog" rel="noreferrer">http://www.example.com/blog</a>
  Doing that sends me to the "Wordpress 404 page not found" page.</p>
  
  <p>I'd be very grateful for a solution!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I'm an idiot - I missed something vital. I needed to also change the Site URL in Wordpress > General to:</p>
  
  <pre><code>http://example.com/blog
  </code></pre>
  
  <p>Doing that and then removing /blog/ from the permalink structure made everything work. I probably wouldn't have spotted this if @IanB hadn't picked up the /blog/ bit not being necessary. Thanks...</p>