Redirection question...

Discussion in 'ASP General' started by Frank Side Burns, Mar 23, 2005.

  1. I have a web page (let's call it main.aspx) that must only be accessible
    thru another web page in my web application. Users should not be able to
    browse directly to 'main.aspx'...they can only be redirected their from
    another page on my site. How does one go about doing this?

    Thanks for any help.
     
    Frank Side Burns, Mar 23, 2005
    #1
    1. Advertisements

  2. Frank Side Burns

    Steven Burn Guest

    Not fool proof but;

    Opt 1;

    <%
    If Session(Request.ServerVariables("REMOTE_ADDR")) <> True Then
    Response.Redirect "theotherpage_URL"
    End If
    %>

    Opt 2;

    <%
    If Request.ServerVariables("HTTP_REFERER") <> "theotherpage_URL" then
    Response.Redirect "theotherpage_URL"
    End If
    %>

    Opt 3: Use cookies (again not fool proof but..... might work)

    --
    Regards

    Steven Burn
    Ur I.T. Mate Group
    www.it-mate.co.uk

    Keeping it FREE!

    "Frank Side Burns" <> wrote in message news:sdj0e.766007$8l.384854@pd7tw1no...
    > I have a web page (let's call it main.aspx) that must only be accessible
    > thru another web page in my web application. Users should not be able to
    > browse directly to 'main.aspx'...they can only be redirected their from
    > another page on my site. How does one go about doing this?
    >
    > Thanks for any help.
    >
    >
    >
    >
    >
     
    Steven Burn, Mar 23, 2005
    #2
    1. Advertisements

  3. Thanks for the ideas. I went with the 'hidden variable' technique...works
    fine.



    "Frank Side Burns" <> wrote in message
    news:sdj0e.766007$8l.384854@pd7tw1no...
    > I have a web page (let's call it main.aspx) that must only be accessible
    > thru another web page in my web application. Users should not be able to
    > browse directly to 'main.aspx'...they can only be redirected their from
    > another page on my site. How does one go about doing this?
    >
    > Thanks for any help.
    >
    >
    >
    >
    >
     
    Frank Side Burns, Mar 23, 2005
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Kleyman

    Authentication/Automatic redirection question

    David Kleyman, Dec 17, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    812
    David Kleyman
    Dec 17, 2003
  2. Dot net work

    Tough redirection question

    Dot net work, Apr 11, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    643
    Dot net work
    Apr 12, 2004
  3. Code Monkee

    Redirection question

    Code Monkee, Dec 16, 2003, in forum: HTML
    Replies:
    6
    Views:
    409
    Leif K-Brooks
    Dec 17, 2003
  4. Disco Octopus

    Redirection Question

    Disco Octopus, Apr 28, 2005, in forum: HTML
    Replies:
    2
    Views:
    457
    Edwin van der Vaart
    Apr 28, 2005
  5. Jp Calderone

    Re: ouput redirection..a newbie question

    Jp Calderone, Dec 15, 2003, in forum: Python
    Replies:
    2
    Views:
    384
    Lonnie Princehouse
    Dec 15, 2003
  6. Ladvánszky Károly

    Question: spawn and redirection

    Ladvánszky Károly, Feb 13, 2004, in forum: Python
    Replies:
    6
    Views:
    802
    Peter Hansen
    Feb 13, 2004
  7. Hoopster

    Question on page redirection

    Hoopster, Aug 16, 2006, in forum: HTML
    Replies:
    2
    Views:
    401
    Michael Winter
    Aug 17, 2006
  8. Alexander Baranov

    Stream Redirection. Newbies question

    Alexander Baranov, Oct 25, 2004, in forum: C Programming
    Replies:
    2
    Views:
    365
    Dan Pop
    Oct 25, 2004
Loading...