A few days ago I was faced with the problem of setting the URLs of the Sitemap.axd from BlogEngine.net lowercase, especially as regards the posts created.
Not having found any sitemap generator with lowercase characters option I went through the following steps.
Here's what to do:
- Let's download Visual Studio Express 2013.
- Let's download the file BlogEngine.net (source) of the current version we are using.
- Let's open the version BlogEngine.sln in Source/Blogengine
- In Solution Explorer of VS 2013 Express we go to BlogEngine.Core.
- Let's edit the file SiteMap.cs which we find here: BlogEngine.Core/HttpHandlers/Web/SiteMap.cs.
- We replace the following lines of code in the Posts scope:
Prima
// Posts foreach (var post in Post.Posts.Where(post => post.IsVisibleToPublic)) { writer.WriteStartElement("url"); writer.WriteElementString("loc", post.AbsoluteLink.ToString()); writer.WriteElementString( "lastmod", post.DateModified.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)); writer.WriteElementString("changefreq", "monthly"); writer.WriteEndElement(); }
After
// Posts foreach (var post in Post.Posts.Where(post => post.IsVisibleToPublic)) { writer.WriteStartElement("url"); writer.WriteElementString("loc", post.AbsoluteLink.ToString().ToLower()); writer.WriteElementString( "lastmod", post.DateModified.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)); writer.WriteElementString("changefreq", "monthly"); writer.WriteEndElement(); }
Basically in the "After" I added the ToLower() all’AbsoluteLink del post “writer.WriteElementString(“loc”, post.AbsoluteLink.ToString())”.
Let's save everything.
- Now let's click on ReBuild (Recompile) in order to recreate the file Blogengine.core.dll.
- We can also press CTRL-F5 to make sure the recompilation has been done.
- We upload the recompiled file BlogEngine.Core.dll present in the path SourceBlogEngineBlogEngine.CorebinRelease and replace the Blogengine.core.dll in the folder bin placed in the root of our site.
Time the Sitemap.axd of our blog presents the URLs of the Posts in lowercase.
Alejandro Crespo Martinez
We are a specialized and passionate team of virtual reality. We have extensive experience in this area. We decided to create ForVirtualRealityLovers to share all our information with customers and users. We have quality information. You can find tips, guides, interviews, top products and much more! If you are curious, enter our site ForVirtualRealityLovers.com and discover the virtual world! 😉
How to configure BlogEngine.net locally with Windows 10 ❯
Articles related toNordVPN review: how it worksFacebook and Instagram blackout: economic repercussions on social mediaSmart watches: the new era of microcomputers linked to the wristHow to ask Aruba to obscure personal data on WhoisHow to hide the Facebook profile from GoogleHow to block notifications from a websiteAdd a comment from BlogEngine.net: set the post URLs to lowercase in the Sitemap.axdInternet
❤️Chi Sleep For Virtual Reality Lovers?For Virtual Reality Lovers we are a team of people who aim to give you all the best information about Virtual Reality. What information do we share?We share everything you need to know about virtual reality, tips, prices, features, guides and much more !. 🤖What are the best virtual reality products?We have the best information section on the best virtual reality products. This work is under a Creative Commons Attribution-Non-Commercial-No Derivatives 4.0 International License. 2021/primerpaso.me X Check out our best articles!How to find out who visits your Facebook profileHow to insert a donation button in Blogengine.netTrack Twitter clicks with FeedburnerHow to archive Outlook messages |