Last post Jun 15, 2015 04:36 AM by Krunal Parekh
Jun 13, 2015 01:15 PM|AGodinho|LINK
I've seen a few examples about routing using parameters, but the parameters are included on the URL.
Something like this example:
Request to /Default.aspx?lk=login ==> route to /Auth/Login.aspx
Request to /Default.aspx?lk=CHPass==> route to /Auth/ChangePassword.aspx
This meant that on Application_Start I'll read from a table with the short name and the real URL, and make all the routes, and maybe a sessions flag to avoid attempt add to duplicated routes.
Is it possible make something like this?
Jun 13, 2015 04:41 PM|mostafasydney|LINK
See the post at: http://www.codeproject.com/Answers/996303/How-to-rewrite-URL-by-a-string-from-database-in-MV?arn=0#answer2
Also you can have a look at:
Hope this will help.
Jun 13, 2015 05:41 PM|AGodinho|LINK
I'm not using MVC... sorry
Jun 15, 2015 04:36 AM|Krunal Parekh|LINK
If you want to route to another method within a web api controller then you could set response.Headers.Location at the url of the method you want to route to.
Please see this:
Hope this helps.