Change Default.aspx Name

Topics: ASP.NET 2.0, Business Logic Layer, Controls
Aug 29, 2010 at 12:17 PM


I am atempting to integrate BE into an existing Website with out creating sub domains or virtual directories. I have just about got it going but I am finding the Month List posts back to a year/month/Default.aspx. I have found and changed the construction of the hyperlink to now be year/month/Blogger.aspx but this directory page does not exist. Blogger.aspx exists under the website root. I am wondering how the original page is found as there is no 2010/01/ directory.

What else do I need to change?




Aug 29, 2010 at 1:54 PM

This is being done in the UrlRewrite.cs file in the BE core (in the Web\HttpModules folder).

There's a method in there named RewriteDefault().  It looks for the year/month pattern and issues a RewritePath.  There's actually 3 possibilities in that same area (year/month/day or year/month or just year).  In all 3 cases, it rewrites to default.aspx (followed by query string parameters for year, month or date).

You would need to change default.aspx to blogger.aspx for the 3 cases, and then recompile the BE core to produce a new BlogEngine.Core.dll file to replace the existing one in your BIN directory.

Aug 29, 2010 at 9:18 PM