Skip to content

Commit

Permalink
DNN-3565 Vanity URLs break "Messages" & "Notifications" Links
Browse files Browse the repository at this point in the history
  • Loading branch information
cnurse committed Sep 11, 2013
1 parent b7a56b1 commit c52e6c4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion DNN Platform/Library/Entities/Urls/RewriteController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ private static bool CheckTabPath(string tabKeyVal, UrlAction result, FriendlyUrl

string prefix = urlSegments[0];

if (prefix == settings.VanityUrlPrefix && urlSegments.Length == 2)
if (prefix == settings.VanityUrlPrefix && urlSegments.Length > 1)
{
string vanityUrl = urlSegments[1];

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
Test, UserName, RedirectOldProfileUrl, VanityUrl, Scheme, Page Name, Test Url, Expected Url, Status, Final Url, RedirectReason
Bad Vanity Url, test, , , http://, Home, http://{alias}/baduser, {defaultPage}?TabId={tabId}, 301, http://{alias}/, Deleted_Page
Vanity Url, test, , testuser, http://, Activity Feed, http://{alias}/{vanityUrl}, {defaultPage}?TabId={tabId}&UserId={userId}, 200
Vanity Url Child, test, , testuser, http://, Messages, http://{alias}/{vanityUrl}/Messages, {defaultPage}?TabId={tabId}&UserId={userId}, 200
Vanity Url Profile, test, , testuser, http://, Activity Feed, http://{alias}/{vanityUrl}/ctl/Profile/pageno/1, {defaultPage}?TabId={tabId}&UserId={userId}&ctl=Profile&pageno=1, 200
Alias Includes Vanity Url, test, , child, http://, Activity Feed, http://{alias}/{vanityUrl}, {defaultPage}?TabId={tabId}&UserId={userId}, 200
Bad Vanity Url, test, , , http://, Home, http://{alias}/users/baduser, {defaultPage}?TabId={tabId}, 301, http://{alias}/, Deleted_Page
Vanity Url, test, , testuser, http://, Activity Feed, http://{alias}/users/{vanityUrl}, {defaultPage}?TabId={tabId}&UserId={userId}, 200
Vanity Url Child, test, , testuser, http://, Messages, http://{alias}/users/{vanityUrl}/Messages, {defaultPage}?TabId={tabId}&UserId={userId}, 200
Vanity Url Profile, test, , testuser, http://, Activity Feed, http://{alias}/users/{vanityUrl}/ctl/Profile/pageno/1, {defaultPage}?TabId={tabId}&UserId={userId}&ctl=Profile&pageno=1, 200
Old Url No Vanity Url Default, test, , , http://, Activity Feed, http://{alias}/Activity-Feed/UserId/{userId}, {defaultPage}?TabId={tabId}&UserId={userId}, 200
Old Url Vanity Url Default, test, , testuser, http://, Activity Feed, http://{alias}/Activity-Feed/UserId/{userId}, {defaultPage}?TabId={tabId}&UserId={userId}, 301, http://{alias}/{vanityUrl}, Unfriendly_Url_2
Old Url Vanity Url Child Default, test, , testuser, http://, Messages, http://{alias}/Activity-Feed/Messages/UserId/{userId}, {defaultPage}?TabId={tabId}&UserId={userId}, 301, http://{alias}/{vanityUrl}/Messages, Unfriendly_Url_2
Old Url Vanity Url Profile Default, test, , testuser, http://, Activity Feed, http://{alias}/Activity-Feed//UserId/{userId}/ctl/Profile/pageno/1, {defaultPage}?TabId={tabId}&UserId={userId}&ctl=Profile&pageno=1, 301, http://{alias}/{vanityUrl}/ctl/Profile/pageno/1, Unfriendly_Url_2
Old Url Vanity Url Default, test, , testuser, http://, Activity Feed, http://{alias}/Activity-Feed/UserId/{userId}, {defaultPage}?TabId={tabId}&UserId={userId}, 301, http://{alias}/users/{vanityUrl}, Unfriendly_Url_2
Old Url Vanity Url Child Default, test, , testuser, http://, Messages, http://{alias}/Activity-Feed/Messages/UserId/{userId}, {defaultPage}?TabId={tabId}&UserId={userId}, 301, http://{alias}/users/{vanityUrl}/Messages, Unfriendly_Url_2
Old Url Vanity Url Profile Default, test, , testuser, http://, Activity Feed, http://{alias}/Activity-Feed//UserId/{userId}/ctl/Profile/pageno/1, {defaultPage}?TabId={tabId}&UserId={userId}&ctl=Profile&pageno=1, 301, http://{alias}/users/{vanityUrl}/ctl/Profile/pageno/1, Unfriendly_Url_2
Old Url No Vanity Url false, test, false, , http://, Activity Feed, http://{alias}/Activity-Feed/UserId/{userId}, {defaultPage}?TabId={tabId}&UserId={userId}, 200
Old Url Vanity Url false, test, false, testuser, http://, Activity Feed, http://{alias}/Activity-Feed/UserId/{userId}, {defaultPage}?TabId={tabId}&UserId={userId}, 200
Old Url Vanity Url Child false, test, false, testuser, http://, Messages, http://{alias}/Activity-Feed/Messages/UserId/{userId}, {defaultPage}?TabId={tabId}&UserId={userId}, 200
Old Url Vanity Url Profile false, test, false, testuser, http://, Activity Feed, http://{alias}/Activity-Feed//UserId/{userId}/ctl/Profile/pageno/1, {defaultPage}?TabId={tabId}&UserId={userId}&ctl=Profile&pageno=1, 200
Old Url No Vanity Url true, test, true, , http://, Activity Feed, http://{alias}/Activity-Feed/UserId/{userId}, {defaultPage}?TabId={tabId}&UserId={userId}, 200
Old Url Vanity Url true, test, true, testuser, http://, Activity Feed, http://{alias}/Activity-Feed/UserId/{userId}, {defaultPage}?TabId={tabId}&UserId={userId}, 301, http://{alias}/{vanityUrl}, Unfriendly_Url_2
Old Url Vanity Url Child true, test, true, testuser, http://, Messages, http://{alias}/Activity-Feed/Messages/UserId/{userId}, {defaultPage}?TabId={tabId}&UserId={userId}, 301, http://{alias}/{vanityUrl}/Messages, Unfriendly_Url_2
Old Url Vanity Url Profile true, test, true, testuser, http://, Activity Feed, http://{alias}/Activity-Feed//UserId/{userId}/ctl/Profile/pageno/1, {defaultPage}?TabId={tabId}&UserId={userId}&ctl=Profile&pageno=1, 301, http://{alias}/{vanityUrl}/ctl/Profile/pageno/1, Unfriendly_Url_2
Old Url Vanity Url true, test, true, testuser, http://, Activity Feed, http://{alias}/Activity-Feed/UserId/{userId}, {defaultPage}?TabId={tabId}&UserId={userId}, 301, http://{alias}/users/{vanityUrl}, Unfriendly_Url_2
Old Url Vanity Url Child true, test, true, testuser, http://, Messages, http://{alias}/Activity-Feed/Messages/UserId/{userId}, {defaultPage}?TabId={tabId}&UserId={userId}, 301, http://{alias}/users/{vanityUrl}/Messages, Unfriendly_Url_2
Old Url Vanity Url Profile true, test, true, testuser, http://, Activity Feed, http://{alias}/Activity-Feed//UserId/{userId}/ctl/Profile/pageno/1, {defaultPage}?TabId={tabId}&UserId={userId}&ctl=Profile&pageno=1, 301, http://{alias}/users/{vanityUrl}/ctl/Profile/pageno/1, Unfriendly_Url_2

0 comments on commit c52e6c4

Please sign in to comment.