This topic is locked

url check

8/22/2005 10:29:54 AM
ASPRunnerPro General questions
author

Hi,
I have two websites and I want one accessed only if from the admin page of the other website... I tried http_referrer but that was the wrong one...
if from
e.g. www.goggle.com/admin/
then can go to
e.g. www.yahoo/admin
If you tried to go to www.yahoo.com/admin/ directly you would be kicked out.
Thanks!

Sergey Kornilov admin 8/23/2005

Hi,
you can use cookies for this purpose. Add this line to the "google" page:

Response.Cookies("camefrom")="google"


and this one- to the "yahoo" page:

Request.Cookies("camefrom")<>"google" then...


However, this is insecure method.

Making it secure way is rather complex task. You would need to set up some sort of direct interaction between your servers or store passwords in cookies.