Home All Groups Group Topic Archive Search About
Author
27 Apr 2006 5:25 PM
AZNewsh
I am sure this is a simple question but I am drawing a blank:

When developing on localhost if I do the following everything is fine:

HttpContext.Current.Response.Redirect("../this_folder/that_folder/apage.aspx")

Takes me to: http://localhost/this_folder/that_folder/apage.aspx

However on my live site there it resides in a subweb and hence there is
another folder involved in the path:

http://www.mysite.com/extrafolder/this_folder/that_folder/apage.aspx

How do I get around this?

Thanks

Author
27 Apr 2006 5:59 PM
Tim
make your dev environment match your live environment. your life will
be better because of it.

or look at the server variable that gives the address then
if localhost do onething
else do another.

or set a global variable path="" or path="extrafolder" accordingly.
Author
27 Apr 2006 6:07 PM
AZNewsh
I would like the two environments to match, that would seem to make
most sense.

The production environment is set in stone and has to be the subweb
setup I mentioned

How would I match that in the dev environment, i.e. is it possible to
add an extra folder that can be excluded from the project when
publishing?
Author
27 Apr 2006 6:21 PM
AZNewsh
Or failing that, how do I redirect to an absolute path?