Want to know a page is a redirect or not redirect page.

Discussion in 'C#' started by wacamoi, Nov 21, 2008.

  1. #1
    Need ASP code can check header or other way by ASP to know a page is a redirect or not redirect page.

    Thanks.
     
    wacamoi, Nov 21, 2008 IP
  2. web-bod

    web-bod Guest

    Messages:
    17
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    classic or .Net?
     
    web-bod, Nov 22, 2008 IP
  3. wacamoi

    wacamoi Peon

    Messages:
    810
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #3
    classic is fine

    need to work for IE and FF

    it will even better if it can define 301 and 302

    PS : I am seeking for free code. (But +Rep will be given for the good code)

    thanks
     
    wacamoi, Nov 22, 2008 IP
  4. web-bod

    web-bod Guest

    Messages:
    17
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I don't think you can. You can check request.servervariables("http_referer"), but that's as near as you'll get.
     
    web-bod, Nov 23, 2008 IP
  5. pitagora

    pitagora Peon

    Messages:
    247
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #5
    you want to know if somebody has redirected to the page you are in now? Not possible. You can however when you redirect to add something distinctive in the querystring to know it's a redirect and simply check the query string in your target page.
     
    pitagora, Dec 6, 2008 IP
  6. Ueland

    Ueland Peon

    Messages:
    66
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Ueland, Dec 6, 2008 IP