I have a .ashx file generating xml for both our rss feed and our sitemap. Our new SEO guy is telling us that the ".ashx" extension is harming us (for example, insisting that the existing "sitemap.ashx" file should be called "sitemap.xml", and the rss feed is "site.rss").
The organization I work for has pretty much lumped me with the hosting as well as the developing, and hosting isn't something I have a lot of experience of (I get by, but not an expert).
I know this is likely to be something in IIS such that requests for one thing get served another thing, but can someone give me a quick nudge in the right direction? I am having trouble even coming up with something to google right now!
EDIT: In this instance it's IIS7 and ASP.net 3.5
It sounds like you'd want to expose/serve http://foo.com/site.rss
, but actually execute http://foo.com/bar.ashx
.
For IIS7 , implement the URL Rewriting module with "Rule with rewrite map".
Try this in your web.config:
<system.webServer>
<rewriteMaps>
<rewriteMap name="StaticRedirects">
<add key="/site.rss" value="/bar.ashx" />
</rewriteMap>
</rewriteMaps>
</system.webServer>