Question

I have this code:

protected override IEnumerable<ShortcutUrlResolver> GetShortcutUrlResolvers() {
    return new[]
        {
            new ShortcutUrlResolver( "someShortcut", ConnectionSecurity.SecureIfPossible, () => SmartRedirector.GetInfo( Pages.One.Two.GetInfo().GetUrl() ) ),
            new ShortcutUrlResolver( "", ConnectionSecurity.SecureIfPossible, () => Pages.Portals.GetInfo() )
        };
}

If I go to mysite/, I end up at the Portals page (the second shortcut above). If I go to mysite/someShortcut, I get a error:

this page is no longer available .
Was it helpful?

Solution

The problem was I wasn't trying to navigate to "mysite/someShortcut", I was trying to navigate to "mysite/someShortcut/", with a trailing slash. The slash counts. So, removing the slash from my URL makes it work. Also, I can include both "someShortcut/" and "someShortcut" as shortcut URLs and then either one will work.

OTHER TIPS

You seem to have the shortcut URLs defined properly, and I don't believe you can get the "The page you requested is no longer available" error when accessing a shortcut URL, so it looks like the problem is coming from a redirect you're doing on your own after the shortcut URL is followed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top