Redirect question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • AZNewsh

    #1

    Redirect question

    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.Cur rent.Response.R edirect("../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:



    How do I get around this?

    Thanks

  • Tim

    #2
    Re: Redirect question

    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="extrafold er" accordingly.

    Comment

    • AZNewsh

      #3
      Re: Redirect question

      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?

      Comment

      • AZNewsh

        #4
        Re: Redirect question

        Or failing that, how do I redirect to an absolute path?

        Comment

        Working...