title: Block access to sitemap.php but allow sitemap.xml
body: <p>I have a sitemap.php file in the news folder, where I dynamically create a sitemap based on the entries which I have in my database. I also have the following <code>.htaccess</code> file:</p>
  <pre><code>RewriteOptions InheritBefore
  RewriteEngine On
  RewriteRule ^sitemap.xml$ sitemap.php [L]
  </code></pre>
  <p>So the link can look like this: domain.com/news/sitemap.xml. It's working, but my question is: How can I block access to the <code>sitemap.php</code> file in .htaccess, so as not to give unnecessary information to others?</p>