Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Giovanni Sidoel 94 posts 233 karma points
    Nov 20, 2012 @ 19:16
    Giovanni Sidoel
    0

    Redirect issue when umbracoUseDirectoryUrls and addTrailingSlash are set to true

    Richard,

    Basically when I use directory urls I won't get redirected to the mediafile after logging in, instead I stay on the login page.

    Th url that I get taken to after requesting a file is:
    /login/?returnurl=filename.pdf

    The cause of all this trouble is the trailing "/" after /login. Umbraco treats the login page as the requested page and redirects me to the login page after logging in instead of the file.

    So the solution seems to be to just set addTrailingSlash to false. And that works fine.

    Now I know this isn't really a bug, but I think you're just using the url's you're getting back from Umbraco. But I think it would be nice if your package could remove the trailing slash from the login url before redirecting to it IF a trailing slash is present. At the very least I think it should be mentioned in the package description and/or manual that when umbracoUseDirectoryUrls is set to true, addTrailingSlash should be set to false as addTrailingSlash is set to true by default. So whenever you have the time :)

    Cheers.

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Nov 21, 2012 @ 08:58
    Richard Soeteman
    0

    HI Giovanni,

    I've added this to the list for 1.1.7 Thanks for the detailed issue report.

    Thanks,

    Richard

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Nov 24, 2012 @ 08:43
    Richard Soeteman
    0

    HI Giovanni,

    Weird but when I use the exact same configuration I still don't get redirected to the returnUrl. Did you configure anything on the login control?

    Thanks,

    Richard

  • Giovanni Sidoel 94 posts 233 karma points
    Nov 24, 2012 @ 11:53
    Giovanni Sidoel
    0

    No I haven't done anything special with the login control.

     

                 FailureText="Uw inlog poging was niet succesvol. Probeer het opnieuw." 
                    PasswordLabelText="Wachtwoord:"
                    RememberMeText="Onthou mij voor de volgende keer." TextLayout="TextOnTop"
                    UserNameLabelText="Gebruikersnaam:"
                    PasswordRecoveryText="Wachtwoord vergeten?"
                    PasswordRecoveryUrl="/wachtwoord-vergeten/" TitleText="">
                   
                   

    Only thing I can think of: I've modified authentication.forms in web.config (login instead of login.aspx):

     <forms name="yourAuthCookie" loginUrl="login" protection="All" path="/" />

    But I don't think that matters all that much.

    Perhaps a good old fashioned republish entire site will help?

     

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Nov 26, 2012 @ 08:27
    Richard Soeteman
    0

    HI Giovanni,

    Tried that same result, really weird. But all things related to this redirect issue are weird. I'm looking for a way to always redirect and implement that in the package to solve this issue. Stay tuned..

    Thanks for the replies,

    Richard

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Nov 30, 2012 @ 15:46
    Richard Soeteman
    0

    HI Giovanni,

    I've implemented my own redirect mechanism in the package to solve this issue. If you download the latest hotfix from the hotfix location it should always redirect to the returnurl when that is specified. Would be nice if you maybe can test if it works on your box before I publish the next release.

    http://hotfix.soetemansoftware.nl/MediaProtect/

    I've tested with aspx extension and when using directory url's with and without trailing slash so I think it must be running fine but want to be sure ;-).

    Thanks,

    Richard

     

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Dec 06, 2012 @ 09:20
    Richard Soeteman
    0

    HI All,

    This returnUrl is fixed in the 1.1.7 Release.

    Best,

    Richard

  • Giovanni Sidoel 94 posts 233 karma points
    Dec 06, 2012 @ 11:35
    Giovanni Sidoel
    0

    Thanks Richard.

    I saw the newsletter announcing the fix. Sorry I haven't gotten round to testing it myself.

    Cheers.

Please Sign in or register to post replies

Write your reply to:

Draft