This project is read-only.

How to move the blog under a subfolder?

Sep 14, 2008 at 4:34 PM
I want to use the BlogEngine as the foundation for a website, rather than the main focus. I am moving the blog under a subfolder and adding content to the parent folder. The steps I took are below and I have some of it working. The remaining problem is broken links, like the main title and the permalink and comments. The links that begin with http://site/blog/post/2008/... are also broken. What other steps do I need to take to fix these links and smoothly move the blog into a subfolder?


J Wolfgang Goerlich

Detailed information:
  • BlogEngine 1.4.5
  • .Net Framework 2.0 SP1
  • Visual Studio 2008
  • Windows Server 2003 Standard
I created a blog subfolder and moved in the following content:
  • User controls folder
  • archive.aspx
  • archive.aspx.cs
  • blog.js
  • contact.aspx
  • contact.aspx.cs
  • default.aspx
  • default.aspx.cs
  • login.aspx
  • login.aspx.cs
  • page.aspx
  • page.aspx.cs
  • post.aspx
  • post.aspx.cs
  • search.aspx
  • search.aspx.cs
Update the Utils.cs file:
  •  Add a AbsoluteBlogRoot, which returns the AbsoluteWebRoot + "/blog/"
  •  Add RelativeBlogRoot, which returns RelativeWebRoot + "/blog/"
Update Posts.cs file:
  •  PermaLink: replace AbsoluteWebRoot with AbsoluteBlogRoot
  •  RelativeLink: replace RelativeWebRoot with RelativeBlogRoot

Update the site.master theme:

  • Replace AbsoluteWebRoot with AbsoluteBlogRoot
Sep 18, 2008 at 3:58 PM
I have also been trying to use the blog in a subfolder instead of having it be the main focus. I have tried a different approach though. I haven't finished setting it up, but instead of moving the content into the parent folder I just have links between the regular site and the blog and will have the blog master page HTML/CSS be a duplicate of the regular site.

You may find this thread interesting: Integrating BE into existing site and multiple sitemaps , because I was discussing this there.

This type of integration seems a bit more difficult than it should be and in WordPress could not be easier. Being that this is such a common and important need, any comparisons between BlogEngine and WordPress should probably cease until integration becomes more straightforward.