Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

RedirectToPage doesn't trim /Index from URL #6080

Closed
DamianEdwards opened this issue Apr 5, 2017 · 3 comments
Closed

RedirectToPage doesn't trim /Index from URL #6080

DamianEdwards opened this issue Apr 5, 2017 · 3 comments

Comments

@DamianEdwards
Copy link
Member

RedirectToPage should trim the trailing /Index from the URL given that it's default anyway.

That is, doing this return RedirectToPage("/Index"); should effectively be the same as return Redirect("~/");.

Obviously needs to work for sub-folders and when route values are passed as well.

@DamianEdwards
Copy link
Member Author

@rynowak @pranavkm @Eilon

@rynowak
Copy link
Member

rynowak commented Apr 5, 2017

Should we even match /Index - right now we create a route entry for / and for /Index? Is there value to the latter?

If we want to keep both, then / needs to have a better value of order so that its considered first.

@Eilon
Copy link
Member

Eilon commented Apr 5, 2017

In the amazing new world of Razor Pages perhaps it's fine to canonicalize URLs to their simplest form?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants