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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

restrict access to a page based on referring URL/domain

Status
Not open for further replies.

aamaker

Programmer
Joined
Jan 20, 2002
Messages
222
Location
US
I have a neat search I built for a clients site - and another site is using the 'action' and passing form variables to it.. I want to make sure that ONLY my sites' pages can run the asp page that shows the search results...

how can I redirect traffice coming to a page elsewhere and allow ONLY pages from my domain to access a page?

javascript, asp???

-- Thanks guys/gals.
 
Hi

Code:
If Instr(Request.Servervariables("http_referrer"),"yourdomainname")>0 then
   ' This is a request from your site -carry on!
Else
   ' Well, you can decide what fitting fate you can bestow on your nemesis, cant you!
End if

All you have to do is ensure that your requesting page is actually being seen as the referrer (it should be!)
Derren
[The only person in the world to like Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top