Ad

Apache Returns Sitemap.xml Not /sitemap

- 1 answer

First, this problem is on my local testing site; the live site is okay.

I have a site where there is a link to blah.com/sitemap. In the DocRoot there is a file called sitemap.xml, which I don't want to display in response to that link. There is a rewrite rule in /.htaccess:

RewriteRule "^([a-z]{1}[\w_\-]+[a-z]{1})$" "/index.php?action=$1" [L]

So, /sitemap should be rewritten to index.php?action=sitemap. The rewrite rule works for everything else on the site.

I presume there is an apache configuration difference between the live and local sites, but I've exhausted my ideas for what it might be. Any ideas? Thanks.

Ad

Answer

This behavior can be caused by MultiViews. Try to disable it:

Options -MultiViews
Ad
source: stackoverflow.com
Ad