In a Rails 2.3 app I have a SitemapController
with a sitemap
action that creates a human-readable sitemap page, and a route to that in the routes file. In the public folder there's a sitemap.xml
file for search engines. The problem is that http://mysite/sitemap
is serving up sitemap.xml
, and not routing to the controller. If I delete sitemap.xml
then it routes to the controller just fine.
On several other very similar sites we have the exact same arrangement, but on those the existence of sitemap.xml
does not prevent Rails from routing to the controller. On those sites, as expected, http://mysite/sitemap
routes to SitemapController#sitemap
and http://mysite/sitemap.xml
serves the static file. Yet I've been unable to discover any difference that could be causing this problem.
Can anyone suggest what might be causing this, or how I might go about debugging it?