Re: [posibleOT] Forcing entering te site thru index.php

From: Date: Sun, 21 Dec 2003 19:03:43 +0000
Subject: Re: [posibleOT] Forcing entering te site thru index.php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-173106@lists.php.net to get a copy of this message
On Sun, Dec 21, 2003 at 03:57:24PM -0300, Fernando M. Maresca wrote: : : Well, i'm trying to avoid access to the site for the middle. Say there : is a initial page with a form and other pages that depends on this. Is : there a way to force users access the site thru the initial form page, : regardless of the url? : Something like this: : lynx http://mysite/forma2.php/ : produce the browser to redirect to : http://mysite/index.php/ : : Of course, the forma2.php must be served if its accesed after index.php. There are several ways to do this. The most obvious is with cookies. Set up your index.php to initially create a cookie that authorizes a user to look in the site. On the rest of your PHP pages, check that this authorization cookie exists. If not, redirect to index.php.

« previous php.general (#173106) next »