Remove project folder from website URL
I have a c# website project in visual studio 2010, and all of my .aspx pages are currently being stored in a ~/Forms directory
. The problem is that when I want to go to any web pages, they are all prefixed with "http://localhost:000/Forms/"
, when what I really want is "http://localhost:000/"
. So, "http://localhost:000/AboutUs.aspx"
instead of "http://localhost:000/Forms/AboutUs.aspx"
. What is the preferred way开发者_开发问答 to deal with a situation like this? I don't want to rig anything up. Thanks!
I noticed your question while trying to find a solution to my own problem.
You can change the path of a website in visual studio by right clicking on the website project, going to "property window", and then setting the virtual path to whatever for instance, you can set it to "/".
If your issue here was just gettinng absolute URLs to work in your test enviroment, this should be enough.
Uh..., don't put your aspx files in a subdirectory maybe?
精彩评论