Hello. I am sure most of you guys have seen a page were it says you must be 18 and older to view the contect of the site. I was wondering if you guys can help me make a page like that. Can you post a code please thanks mike
You could always do something like this... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title> YourWebsite.com | You must be over 18 to view the site </title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <style type="text/css"> * { padding: 0; margin: 0; } </style> </head> <body> <h1> Your Website.com </h1> <p> Thank you for visiting yourwebsite.com. You however have to be over 18 to view the content of the site... </p> <form action="http://www.yourwebsite.com/allow.html"> <fieldset> <legend> Over </legend> <input type="submit" value="I am over 18"> </fieldset> </form> <form action="http://www.goole.com"> <fieldset> <legend> Under </legend> <input type="submit" value="I am under 18"> </fieldset> </form> </body> </html> HTML:
What im trying to do is, if someone comes to my site they have to go through a warning entrance page. The code you gave me is perfect i can modify from there but how do i make it come up when someone enters my site? Does anyone know how to do this please help thanks mike
Well the simplest way to do it is to create a file called, index.html then put the code in that I gave you. Anytime somebody visits your domain then they will be shown this file. If you then create a folder called "allow" you can move all of you site's files into that folder, and alter my code where I typed http://www.yourwebsite.com/allow.html change that to, http://www.yourwebsite.com/allow This will only work if somebody visits the domain directly, I.E. it will not work if they visit, yourdomain.com/thispage.html. If you need that to work aswell I believe that you will have to use a server side scripting language such as PHP, that's much harder.
hi sir thanks for your time. Yes I see what your saying. So it looks luke I'm going to need the php version that u mentioned. Do you know how to code the Php version? I'm willing to pay for your time? If you don't do you know anyone that can do this? I would like the whole entire site locked. And only way to enter would be through the entrance. Thanks mike
You need to be careful with this sort of thing as do it wrong and spiders wont be able to index your page because they keep getting bumped back to the first page or as with the above example code they are unable to "press" a button.