Current location: Hot Scripts Forums » Programming Languages » ASP » Block Access to a page


Block Access to a page

Reply
  #1 (permalink)  
Old 07-20-03, 05:01 PM
Ikoh Ikoh is offline
Newbie Coder
 
Join Date: Jul 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Block Access to a page

Does anyone know a way to block access to an ASP page to everyone but the people who come from a certain domain?

An example would be...

Let’s say I own a personals site... as a special deal I offer members of X.com (not pay pal) a free account. However I do not one someone just browsing around to get this free account. I understand this would not be very secure and I am fine with it... but it is a simple enough solution that I feel it would be worth weeding out people who find away around it.

Thank you for your time

Sincerely,

Mark
Reply With Quote
  #2 (permalink)  
Old 07-21-03, 09:51 AM
angst angst is offline
Newbie Coder
 
Join Date: Jul 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
use this,
just change the www.domain.com with your domain.

<%
host = "www.domain.com"
if Request.ServerVariables("SERVER_NAME")=host then
response.write "hello world!"
else
response.write "access denied"
End If
%>
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
need to make a confirmation page codeguru21 PHP 1 10-02-03 04:18 PM
Date From Access 2000 Database Kaikki ASP 4 09-25-03 06:04 PM
mysql to access aspuser25 Database 2 09-16-03 11:01 AM
page navigation help grafik ASP 1 07-27-03 02:08 PM
preload an asp page Gurrutello ASP 1 06-24-03 08:12 PM


All times are GMT -5. The time now is 04:22 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.