Re: VS.NET, Default Web Site, and relative paths...
Ryan Heath <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.web |
|---|---|
| Message-ID | <[email protected]> |
Use ~/ as your root. Thus instead of linking to /myapp/default.aspx you should link to ~/default.aspx HTH // Ryan On 12/14/06, Ben Joyce <[email protected]> wrote: > Morning all. > > I am developing a website in VS.NET 2005 on an XP machine and by > default it has created the site under the Default Web Site on the > local machine. When I run my app within VS.NET or browse it mnually I > find it at the following address: > > http://localhost/myapp/default.aspx > > Within my application I reference other pages using the syntax > "/myapp/blah/blah/blah" - (such as the main menu at the root, the > images folder, and various other shared resources). > > This works fine locally and in the development stages, but when in > production the website will not live under a /myapp folder from the > Default Web Site root - it will be a new website. > > This causes a problem with referencing the site root as "/myapp". > > I'd like to find a solution that works in both situations without > making any code changes when I put the site into production. > > Any help or thoughts appreciated. > > Cheers, > > Ben > > =================================== > This list is hosted by DevelopMentor(r) http://www.develop.com > > View archives and manage your subscription(s) at http://discuss.develop.com > =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com