No announcement yet.

redirect up a directory

  • Filter
  • Time
  • Show
Clear All
new posts

  • redirect up a directory

    When I do Response.Redirect "page.asp", how can I make it go back up one directory?

    For example, you have the root directory where default.asp resides:

    In the root you have a members area:

    Inside the members area you have a landing page:

    If I want that page to redirect back to default in the root, how do I do that?

    If I use default, it assumes the current directory.

  • #2
    Re: redirect up a directory

    Have you tried this;
    'Go one folder up and take the new path to <folder>';

    'Go two folders up and take the new path to <folder>';

    and so on

    The examples are for the dos shell, but maybe they work for asp too if you just change the direction of the slashes? (?)

    This is what I found about Paths in ASP.NET;
    Use ~ to refer to relative to root url paths;

    I hope it helps,


    This posting is provided "AS IS" with no warranties, and confers no rights.


    ** Remember to give credit where credit's due **
    and leave Reputation Points for meaningful posts


    • #3
      Re: redirect up a directory

      Rems, that was what i was looking for. Thanks.