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 .htaccess
file:
RewriteOptions InheritBeforeRewriteEngine OnRewriteRule ^sitemap.xml$ sitemap.php [L]
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 sitemap.php
file in .htaccess, so as not to give unnecessary information to others?