I have implemented a simple login system in javascript where an user has to input the correct username and password.
If correct, he is redirected to log1.html. There, the user can reach several subpages like log1-sub.html.
Now, I haven’t found a good solution to prevent a user to just type the url in the address bar of the browser to reach the log1.html page.
Can anyone of you give me a short hint please?
Thanks much!
Regards,
enne
Javascript is a poor solution for this since someone can just turn it off and foil your entire system.
If your server is Apache you can use
.htaccessfor simple authentication. For IIS see this resource Anything more fancy and you will have to handle it with a server-side language as mentioned in the comments.