block direct access to web pages

V

V

I have a web site in asp where I do not want the users to
directly type in the URL
of some pages in the browser. For e.g. the main page
is 'index.asp' and depending on
the users resolution either 'mypage1024.asp' or
page 'my800.asp' would open up in the
browser.

What I want is that no user should be able to directly
access the page by typing in
the URL www.mysite.com/page1024.asp or
www.mysite.com/800.asp. If a user
tries to access these pages directly then they should be
forcefully redirected to the
home page www.mysite.com/index.asp and this page would
check the resolution
and load the 'mypage1024.asp' or 'mypage800.asp' depending
on the users resolution.

Can someone tell me how to go about this.

V
 
K

Ken Schaefer

Set a session variable on the index.asp page. Then, on both of the other
pages, check for the session variable, and if it's not there, redirect to
index.asp

However, sessions rely on cookies being enabled on the client.

Cheers
Ken



: I have a web site in asp where I do not want the users to
: directly type in the URL
: of some pages in the browser. For e.g. the main page
: is 'index.asp' and depending on
: the users resolution either 'mypage1024.asp' or
: page 'my800.asp' would open up in the
: browser.
:
: What I want is that no user should be able to directly
: access the page by typing in
: the URL www.mysite.com/page1024.asp or
: www.mysite.com/800.asp. If a user
: tries to access these pages directly then they should be
: forcefully redirected to the
: home page www.mysite.com/index.asp and this page would
: check the resolution
: and load the 'mypage1024.asp' or 'mypage800.asp' depending
: on the users resolution.
:
: Can someone tell me how to go about this.
:
: V
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,737
Latest member
Georgeengab

Latest Threads

Top