MVC3 published to subfolder, is adding the folder path to URL

martinhel

New Member
I've published an MVC 3 site to my godaddy ultimate hosting account. I'm using the FTP publish utility in VS 2010. Everything works okay, except for one thing. It's adding the folder path information to the URLs. On my local machine, when I run it an example web address would be:
localhost:36370/About/History.But after I publish my site, I get an additional /_sites/website/ directory added to all of my links. What I want is: www.mysite.com/About/History

What I end up getting is: www.mysite.com/_sites/website/About/HistoryThis is the code I'm using to display the link:
@Html.ActionLink("About Us", "History", "About")The other interesting thing is that if I manually type in what I want, the page loads fine. But for some reason all of my html.actionlinks and url.content add the additional _sites/website/ directory to the URL.My Hosting is using IIS7.0, ASP.NET Runtime Version: 4.0. And the directory "website" that holds all of my files is set as the application root.I've searched all over and haven't found a solution. I did see another similar question in this thread, but not an answer. This is my first question here, so I don't know if I should have "bumped" the other question somehow or asked my own.Also, this is my route information I am currently using taken from Global.asax.cs file. \[code\] public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults ); }\[/code\]
 
Back
Top