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 :)
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):
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..
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.
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 ;-).
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.
HI Giovanni,
I've added this to the list for 1.1.7 Thanks for the detailed issue report.
Thanks,
Richard
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
No I haven't done anything special with the login control.
Only thing I can think of: I've modified authentication.forms in web.config (login instead of login.aspx):
But I don't think that matters all that much.
Perhaps a good old fashioned republish entire site will help?
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
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
HI All,
This returnUrl is fixed in the 1.1.7 Release.
Best,
Richard
Thanks Richard.
I saw the newsletter announcing the fix. Sorry I haven't gotten round to testing it myself.
Cheers.
is working on a reply...