title: Remove index.php from Wordpress URLs
body: <p>I am new to Wordpress but tried all documentation and Stack Overflow posts for possible solutions but none of them have worked so far.</p>
  
  <p>I have verified that mod rewrite is enabled and working as expected. Followed all steps mentioned here. <a href="https://wordpress.stackexchange.com/questions/105795/remove-index-php-from-permalinks">https://wordpress.stackexchange.com/questions/105795/remove-index-php-from-permalinks</a></p>
  
  <p>Also restarted Apache couple of times but still getting 404 errors when I remove index.php path from Permalink Settings.</p>
  
  <p>Renamed the wordpress directory to blog to access the site at www.xyz.com/blog. Now the requirement is to access any blog posts with 
      www.xyz.com/blog/2018/02/09/my-wp-post without index.php in the URLs.</p>
  
  <p>We don't have any other CMS content other than WP for the blog site.</p>
  
  <p>Permalink settings(Custom Structure):
      /index.php/%year%/%monthnum%/%day%/%postname%/</p>
  
  <p>.htaccess file contents:</p>
  
  <p><code>BEGIN WordPress
      &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></p>