Skip to content

Commit

Permalink
More correct path rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
tatarincev committed Dec 7, 2017
1 parent 1416770 commit 1ceb688
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions VirtoCommerce.Storefront/Extensions/PathStringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public static PathString TrimStoreAndLangSegment(this PathString path, Store sto
}

//need to remove store and language if it already exist in path
path = Regex.Replace(path, @"/\b" + store.Id + @"\b/?", "/", RegexOptions.IgnoreCase);
path = Regex.Replace(path, @"/\b" + language.CultureName + @"\b/?", "/", RegexOptions.IgnoreCase);
path = Regex.Replace(path, @"^/\b" + store.Id + @"\b/", "/", RegexOptions.IgnoreCase);
path = Regex.Replace(path, @"/\b" + language.CultureName + @"\b/", "/", RegexOptions.IgnoreCase);
return path;
}

Expand Down

0 comments on commit 1ceb688

Please sign in to comment.