diff --git a/.hgsubstate b/.hgsubstate
index 66375952b..20ed5e4d1 100644
--- a/.hgsubstate
+++ b/.hgsubstate
@@ -1,4 +1,4 @@
-e800b87c0c7de675a59cf35db10d82d75b8625fa src/Orchard.Web/Modules/Orchard.Autoroute
+f892519aacc32cbacc562ae5f1461ca9c5fd4919 src/Orchard.Web/Modules/Orchard.Autoroute
c54cb640d6bc14c51b9fb9bd78231bb0facec067 src/Orchard.Web/Modules/Orchard.Forms
204bdef384f41bb5e463bed6b98a056945a7d839 src/Orchard.Web/Modules/Orchard.Rules
ce578373f907c0a55fd91229a344f0755f290174 src/Orchard.Web/Modules/Orchard.TaskLease
diff --git a/src/Orchard.Specs/Blogs.feature b/src/Orchard.Specs/Blogs.feature
index 882cdb127..5e351ee2a 100644
--- a/src/Orchard.Specs/Blogs.feature
+++ b/src/Orchard.Specs/Blogs.feature
@@ -67,7 +67,7 @@ Scenario: I can create a new blog with multiple blog posts each with the same ti
And I fill in
| name | value |
| Title.Title | My Post |
- | Autoroute.CurrentUrl | my-post |
+ | Autoroute.CurrentUrl | my-blog/my-post |
| Body.Text | Are you still there? |
And I hit "Publish Now"
And I go to "my-blog/my-post-3"
@@ -120,7 +120,7 @@ Scenario: The virtual path of my installation when not at the root is reflected
And I go to "admin/blogs"
And I follow "My Blog"
And I follow "New Post" where class name has "primaryAction"
- Then I should see "http\://localhost/OrchardLocal/my-blog/"
+ Then I should see "http\://localhost/OrchardLocal/"
Scenario: The virtual path of my installation when at the root is reflected in the URL example for the slug field when creating a blog or blog post
Given I have installed Orchard at "/"
@@ -133,7 +133,7 @@ Scenario: The virtual path of my installation when at the root is reflected in t
And I go to "admin/blogs"
And I follow "My Blog"
And I follow "New Post" where class name has "primaryAction"
- Then I should see "http\://localhost/my-blog/"
+ Then I should see "http\://localhost/"
Scenario: I set my blog to be the content for the home page and the posts for the blog be rooted to the app
Given I have installed Orchard
diff --git a/src/Orchard.Specs/Blogs.feature.cs b/src/Orchard.Specs/Blogs.feature.cs
index 02c462a50..61a9cc0fd 100644
--- a/src/Orchard.Specs/Blogs.feature.cs
+++ b/src/Orchard.Specs/Blogs.feature.cs
@@ -235,7 +235,7 @@ this.ScenarioSetup(scenarioInfo);
"My Post"});
table6.AddRow(new string[] {
"Autoroute.CurrentUrl",
- "my-post"});
+ "my-blog/my-post"});
table6.AddRow(new string[] {
"Body.Text",
"Are you still there?"});
@@ -385,7 +385,7 @@ this.ScenarioSetup(scenarioInfo);
#line 122
testRunner.And("I follow \"New Post\" where class name has \"primaryAction\"");
#line 123
- testRunner.Then("I should see \"http\\://localhost/OrchardLocal/my-blog/\"");
+ testRunner.Then("I should see \"http\\://localhost/OrchardLocal/\"");
#line hidden
this.ScenarioCleanup();
}
@@ -423,7 +423,7 @@ this.ScenarioSetup(scenarioInfo);
#line 135
testRunner.And("I follow \"New Post\" where class name has \"primaryAction\"");
#line 136
- testRunner.Then("I should see \"http\\://localhost/my-blog/\"");
+ testRunner.Then("I should see \"http\\://localhost/\"");
#line hidden
this.ScenarioCleanup();
}
diff --git a/src/Orchard/Utility/Extensions/HttpRequestExtensions.cs b/src/Orchard/Utility/Extensions/HttpRequestExtensions.cs
index 7a6e91d07..511f1ba2f 100644
--- a/src/Orchard/Utility/Extensions/HttpRequestExtensions.cs
+++ b/src/Orchard/Utility/Extensions/HttpRequestExtensions.cs
@@ -26,7 +26,7 @@ namespace Orchard.Utility.Extensions {
/// http://localhost:3030/OrchardLocal
/// Prevents port number issues by using the client requested host
public static string ToApplicationRootUrlString(this HttpRequestBase request) {
- string url = string.Format("{0}://{1}{2}", request.Url.Scheme, request.Headers["Host"], request.ApplicationPath);
+ string url = string.Format("{0}://{1}{2}", request.Url.Scheme, request.Headers["Host"], request.ApplicationPath == "/" ? string.Empty : request.ApplicationPath);
return url;
}
@@ -36,7 +36,7 @@ namespace Orchard.Utility.Extensions {
/// http://localhost:3030/OrchardLocal
/// Prevents port number issues by using the client requested host
public static string ToApplicationRootUrlString(this HttpRequest request) {
- string url = string.Format("{0}://{1}{2}", request.Url.Scheme, request.Headers["Host"], request.ApplicationPath);
+ string url = string.Format("{0}://{1}{2}", request.Url.Scheme, request.Headers["Host"], request.ApplicationPath == "/" ? string.Empty : request.ApplicationPath);
return url;
}