Yes we tried overriding GetVaryByCustomString, but found it is only called when output caching is enabled. We have output cached disabled in our project.
If i look in the code of the FriendlyURLRewriteProvider:
private bool ResolveUrlAndCache(UrlBuilder url, FriendlyUrlRewriteProvider.LanguageApiMode apiMode, ref object internalObject, out LanguageBranch languageBranch)
{
languageBranch = null;
string text = "EPiServerFriendlyUrl:" + url.Path;
object obj = CacheManager.Get(text);
if (obj != null)
{
return obj != FriendlyUrlRewriteProvider._noHit && this.UpdateCachedItem(url, obj, ref internalObject, out languageBranch);
}
if (this.ConvertToInternalFacade(url, apiMode, ref internalObject, out languageBranch))
{
this.AddToCache(url, text, ref internalObject);
return true;
}
this.StoreInCache(text, FriendlyUrlRewriteProvider._noHit);
return false;
}
It looks like the object is retrieved from the cache only on the Path of the url. So now i wonder whether the setup of different startnodes will solve the problem.