title: .htaccess rules resulting in 404 error for /page/ if /page.[ext] is present
body: <p>The problem: the presence of an identical URL to /page/, but with some file extension, i.e., /page.xml, results in a 404 for /page/.</p>
  
  <p>So for example, my HTML sitemap, example.com/sitemap will 404 if example.com/sitemap.xml is present.</p>
  
  <p>The .htaccess file of my Wordpress site contains rewrite conditionals that, as expected, appends a trailing slash to pages in the form of example.com/page so they are rewritten as example.com/page/.</p>
  
  <p><strong>.htaccess as follows:</strong></p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{HTTPS} !=on
  RewriteRule .* https://example.com%{REQUEST_URI} [R=301,L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)([^/])$ /$1$2/ [L,R=301]
  
  # BEGIN WordPress
  &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;
  # END WordPress
  
  # BEGIN MainWP
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteRule ^wp-content/plugins/mainwp-child/(.*)$ /wp-content/plugins/THIS_PLUGIN_DOES_NOT_EXIST [QSA,L]
  &lt;/IfModule&gt;
  # END MainWP
  </code></pre>