I am looking for the best way to link to an item in the Sitecore client (not the external website). The link will be embedded in a broken links report email. The user should be able to click the link and launch the Sitecore content editor with that Item auto-selected in the tree.
I have found Mark Ursino's solution on his blog here, but unfortunately, it only works if you are actively logged into Sitecore (Otherwise, it brings you to the Sitecore Desktop after logging in).
I am running Sitecore.NET 6.4.1 (rev. 110324)
UPDATE
Just to close the loop on Marko's solution:
public void Process(LoggedInArgs args)
{
string url = HttpUtility.UrlDecode(WebUtil.GetQueryString("url"));
// Ensure we're dealing with the client login site and there is a URL to redirect to
if (Sitecore.Context.GetSiteName() == "login" &&
!String.IsNullOrEmpty(url))
{
var queryString = WebUtil.ParseQueryString(url);
// Check for redirect param to prevent accidental redirections
if (queryString.ContainsKey("redirectAfterLogin"))
WebUtil.Redirect(url);
}
}