I’m sure this is a simple issue, but I have noticed that when I host (shared host on GoDaddy) a website the URL repeats the Application name.
Example, I have http://makedifferences.org, if I go to this its fine, but if I click a link it takes me to http://makedifferences.org/makedifferences/…
It’s not just this one site, it’s all my sites on GoDaddy and I think it may be the same on my sites hosted elsewhere, but I can’t check them rite now.
I’m not using web deploy to deploy it, as my first thought was it had to do IIS. My guess is that it must be a setting in Publish Settings, but I played around with them and couldn’t seem to get it to go away.
Any advice would be appreciated.
Thanks,
Garrett
Update
This is apparently not a mvc thing as I check on a site I have hosted at dotnet-host.com and it doesn’t have this problem. So I guess it is something with my settings at Godaddy.
I have deleted the folder and setup a virtual folder and this did not fix the problem.
I have multiple site hosting through them and my domain name A record is my dedicated IP for all the sites, then in host’s domain management I point the domain name to the folder the site is in.
I think this is the correct way to do this but am not sure.
To restate my problem now that I know a bit more about it, if I type in http://makedifferences.org/Charities/Details/3 the page loads and everything is perfect. But if I click a link on the home page to go there the url is http://makedifferences.org/makedifferences/Charities/Details/3
Thanks why I thought it was a setting in Visual Studio.
There are two things that cause this behavior.
I suppose you are hosting multi-websites in shared hosting.
To get rid of this problem, you need to go in the IIS settings and set these folders as virtual directories…..Or create one for each website….And then install your application in that folder.
UPDATE
To get rid of this problem, add the following code to your Web.config’s
system.webServerelementSolution seeked from HERE
Best of luck 🙂