diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Routing/ARCHIVECONSTRAINT.CS b/src/Orchard.Web/Modules/Orchard.Blogs/Routing/ArchiveConstraint.CS similarity index 77% rename from src/Orchard.Web/Modules/Orchard.Blogs/Routing/ARCHIVECONSTRAINT.CS rename to src/Orchard.Web/Modules/Orchard.Blogs/Routing/ArchiveConstraint.CS index 3f56cda24..bb4c0e707 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Routing/ARCHIVECONSTRAINT.CS +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Routing/ArchiveConstraint.CS @@ -37,6 +37,12 @@ namespace Orchard.Blogs.Routing { var archiveIndex = path.IndexOf("/archive/", StringComparison.OrdinalIgnoreCase); if (archiveIndex == -1) { + + // archive for blog as homepage ? + if(path.StartsWith("archive/", StringComparison.OrdinalIgnoreCase)) { + return String.Empty; + } + return null; } @@ -47,6 +53,12 @@ namespace Orchard.Blogs.Routing { var archiveIndex = path.IndexOf("/archive/", StringComparison.OrdinalIgnoreCase); if (archiveIndex == -1) { + + // archive for blog as homepage ? + if (path.StartsWith("archive/", StringComparison.OrdinalIgnoreCase)) { + return new ArchiveData(path.Substring("archive/".Length)); + } + return null; } diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Routing/IARCHIVECONSTRAINT.CS b/src/Orchard.Web/Modules/Orchard.Blogs/Routing/IArchiveConstraint.CS similarity index 100% rename from src/Orchard.Web/Modules/Orchard.Blogs/Routing/IARCHIVECONSTRAINT.CS rename to src/Orchard.Web/Modules/Orchard.Blogs/Routing/IArchiveConstraint.CS diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Routing/IRSDCONSTRAINT.CS b/src/Orchard.Web/Modules/Orchard.Blogs/Routing/IRsdConstraint.CS similarity index 100% rename from src/Orchard.Web/Modules/Orchard.Blogs/Routing/IRSDCONSTRAINT.CS rename to src/Orchard.Web/Modules/Orchard.Blogs/Routing/IRsdConstraint.CS diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Routing/RSDCONSTRAINT.CS b/src/Orchard.Web/Modules/Orchard.Blogs/Routing/RsdConstraint.CS similarity index 74% rename from src/Orchard.Web/Modules/Orchard.Blogs/Routing/RSDCONSTRAINT.CS rename to src/Orchard.Web/Modules/Orchard.Blogs/Routing/RsdConstraint.CS index fec2fd2ab..9eb29fed1 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Routing/RSDCONSTRAINT.CS +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Routing/RsdConstraint.CS @@ -30,11 +30,16 @@ namespace Orchard.Blogs.Routing { } public string FindPath(string path) { - if (!path.EndsWith("/rsd", StringComparison.OrdinalIgnoreCase)) { - return null; + if (path.EndsWith("/rsd", StringComparison.OrdinalIgnoreCase)) { + return path.Substring(0, path.Length - "/rsd".Length); } - return path.Substring(0, path.Length - "/rsd".Length); + // blog is on homepage + if(path.Equals("rsd", StringComparison.OrdinalIgnoreCase)) { + return String.Empty; + } + + return null; } } } \ No newline at end of file