I need to avoid entering an html address, that is, if someone tries to enter from the browser, it directs it to the main page. On the other hand, it is only possible to access from the main page.
I would like to do it from htaccess, my js is the following
$(".accept").click(function (event) {
var counter = 0;
$(".accept").each(function(key, checkbox) {
if(checkbox.checked == false) {
$("#purchase-continue").attr("disabled", "disabled");
return false;
} else {
counter++;
if(counter == $(".accept").length) {
$("#purchase-continue").attr("disabled", false);
}
}
});
});
$('#buy-token').on("#modal.close", function(event, modal) {
$(".accept").prop('checked', false);
$("#purchase-continue").attr("disabled", "disabled");
});
$("#purchase-continue").click(function() {
switch($(this).attr("data-source")) {
case "more-information":
top.location.href = "information.html";
break;
case "buy":
top.location.href = "instructions.html";
break;
}
});