tags:

views:

21

answers:

1

My website uses Response.Redirect("~/Main/Main.aspx") type redirects all over the place. Worked flawlessly until the Webhost4Life (don't groan) decided to migrate my website and in doing so managed to completely break it.

What is this "~" mechanism actually called?

Thanks, Rob.

PS. The bug is that Response.Redirect("~/main.aspx") from http://backdoor.whatpub.org/default.aspx doesn't go to http://backdoor.whatpub.org/main.aspx (as it did on the old server) but to http://backdoor.whatpub.org/live/main.aspx. Live is the name of the sub-folder containing the website and AFAIK means that the root is getting returned as http://backdoor.whatpub.org/live and not just http://backdoor.whatpub.org

+2  A: 

it is a shortcut to HttpRuntime.AppDomainAppVirtualPath property, which refers to the virtual application root, not the root of the web server.

hallie
Thanks for this. So for this to return http://backdoor.whatpub.org/live and not http://backdoor.whatpub.org would suggest that the way the applications are being set-up on the new web4hostlife platform is wrong?
Rob Nicholson