+1-888-365-2779
Try Now

SiteMap.xml Handler

by LeapFrog Interactive
Publication date:
Jan 2, 2012, 04:47 AM

Version:
1.0

Compatibility:
  • Sitefinity 4.x

Price: $ 0
The SiteMap.xml Handler is a .ashx handler file for generating Sitemap.xml files for your site.  This code is intended as a base for developers but should be ready for any site with one minor adjustment (installation step 2). The .cs file clocks in at less than 100 lines of actual code. Full source is included

Installation:
1. Drop the files sitemap.ashx and sitemap.ashx.cs into the root of your project.
2. Open sitemap.ashx.cs and adjust the BASE_URL constant to your domain ( i.e. http:///www.yoursite.com/)
3. Add "Sitemap: http:///www.yoursite.com/sitemap.ashx" to your robots.txt file

sitemap.ashx.cs also includes an example of how to append custom urls to the sitemap .xml file.

Sitefinity CMS validated extension