Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirect user if they type in the full path of a 'No public access' pg

Status
Not open for further replies.

JoJoH

Programmer
Jan 29, 2003
356
US
Hi all,

I am wondering, is there any way to redirect user to another page if they type in the full path of a particular page that I want to protect and do not want public access?

Please advice.

Thanks in advance

JoJoH

 
create an default.asp (set it to be default page in IIS -- by default it is), then write one line

<% Response.Redirect &quot;login.asp&quot; %>
 
You can control this with a session.
Have a login page, check the login and if ok set a session e.g. session(&quot;loggedin&quot;)=&quot;True&quot;
Then on the protected page put at the very top
<%
if session(&quot;loggedin&quot;)<>&quot;True&quot; then response.redirect &quot;somepage.asp&quot;
%>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top