If you are using Linux or Unix, htaccess is the safest way.
But you can also use cookies like this:
On the page where you check the password, set a cookie, something like this:
Response.Cookies("NameOfCookie" = "Validated";
Then on the page they are accessing, use this:
if (Request.Cookies("NameOfCookie" != "Validated"
{
Response.Redirect("loginfailed.html"
}
Maybe something like this will help you.
But you can also use cookies like this:
On the page where you check the password, set a cookie, something like this:
Response.Cookies("NameOfCookie" = "Validated";
Then on the page they are accessing, use this:
if (Request.Cookies("NameOfCookie" != "Validated"
{
Response.Redirect("loginfailed.html"
}
Maybe something like this will help you.