I have a little problem here. I need to add a trailing slash at the end of each url in the site I\'m working on. I defined all the links inside the site to have a trailing s
There are some really good answers but here is some MVC Controller code of how I implement it in a very simple get.
public ActionResult Orders() { if (!Request.Path.EndsWith("/")) { return RedirectPermanent(Request.Url.ToString() + "/"); } return View(); }
Hope this helps someone.