I am trying to redirect to a page in MVC website so I have the following code in my controller:
return Redirect("/test");
I am running my site locally through IIS on a domain of test.local
and when I hit this controller I would expect to go off to http://test.local/test
but instead, for some reason, it is redirecting me to http://localhost/test
Does anyone know how I can make it stay on the same domain without having to put the domain name into the redirect or do I have to include the domain name as well?
Please note as well that I am unable to use RedirectToRoute
or RedirectToAction
as the url is a separate application (under the same domain as the current site)