English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I want to make it so people cant just chop straight to parts of my website but always have to go through my index page first.

2007-09-12 20:36:25 · 5 answers · asked by The Shadow 3 in Computers & Internet Programming & Design

5 answers

Its not possible with flat html websites, but you can consider using flash or javascript.

Creating sites with Flash guarantees that the visitor must see the home page (index page) first.

Although be aware going down this route will significantly reduce your site's search optimisation potential.

2007-09-12 20:51:53 · answer #1 · answered by Urban Kudos 2 · 0 0

1. Create a session number when someone opens the index page, and put it at the very top (before "")
$session = md5(uniqid(rand(), true));
?>
This will create a unique random number of about 40 characters.
2. Pass that number to all other php pages, like:

3. On all other pages, put a small routine at the beginning of the body:

if ( ! isset ($c)) // the session has not been passed
exit ( );
?>


Use the "exit" if you want them to get a white page only.
Otherwise, use the script to jump to index page.

2007-09-13 06:51:27 · answer #2 · answered by just "JR" 7 · 0 0

Use session variables and php. As anyone opens the index.html use a small php script at the top of the page to set a session variable, then on the other pages use a script to check if that variable is set, and divert to the index page if not.

2007-09-13 04:59:14 · answer #3 · answered by Anonymous · 0 0

You can check HTTP_REFERER.
With (classic) ASP it goes like this:
Response.Write "You came to this site from: "
Response.Write(Request.ServerVariables("http_referer"))

I think you'll get the point.

2007-09-13 03:54:12 · answer #4 · answered by Timo J 4 · 0 0

i done this before a long time ago, i'm sure i went to

http://javascript.internet.com/

If its not there it's still full of cool free scripts.

Al....

2007-09-13 04:49:46 · answer #5 · answered by alser 2 · 0 0

fedest.com, questions and answers