title: Loading index.php contents which located outside blog folder for post single page
body: <p>I'm creating <strong>blog</strong> page as WordPress for my static PHP website. When blog page URL changes to <code>pretty permalink</code> (<code>example.com/blog/my-post-page</code>), loading contents (not redirecting to index.php, only contents loading and URL will be like <a href="http://example.com/blog/my-post-page">http://example.com/blog/my-post-page</a>) of <code>index.php</code> (home page for my site) that is located outside blog folder instead of <code>single.php</code> contents.</p>
  
  <p>When <strong>permalink</strong> changes to <code>default</code> (<code>example.com/blog/?p=123</code>), it will work perfectly. </p>
  
  <p>I need URL as <a href="http://example.com/blog/my-post-page">http://example.com/blog/my-post-page</a>.</p>
  
  <p>EDIT : - I have updated permalink to Custom Structure as <code>/index.php/%postname%/</code>. But now post pages are showing with <code>example.com/blog/index.php/my-post-page</code>.</p>
  
  <p>I think the issue raised with the new WordPress version. (Version 4.2.2).
  Any solutions to remove <code>index.php</code> from URL ?</p>
  
  <p>My Directory Structure:-</p>
  
  <pre><code>/                                          - Root
  /blog                                      - Blog folder
  /blog/wp-content/themes/mytheme/           - Theme folder
  /blog/wp-content/themes/mytheme/single.php - Post Single page
  
  /index.php                                 - Home page (Loading contents of this file)
  </code></pre>
  
  <p>My htaccess :- </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>
  
  <p>When I delete/rename index.php in root folder, page will show not found error.</p>