Re: redirect to a page the fist time a site is accessed
| From: | Don | Date: | Wed, 15 Apr 2009 20:20:05 +0000 |
| Subject: | Re: redirect to a page the fist time a site is accessed | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-291540@lists.php.net to get a copy of this message | ||
"Andrew Ballard" <aballard@gmail.com> wrote in message
news:b6023aa40904150926g3e6fb478s36b18b6a53ec3b4f@mail.gmail.com...
On Tue, Apr 14, 2009 at 10:30 PM, Jason Pruim <jason@jasonpruim.com> wrote:
>
>
> On Apr 14, 2009, at 10:11 PM, "Don" <don@program-it.ca> wrote:
>
>> Hi,
>>
>> I have some code in my index.php file that check the user agent and
>> redirects to a warning page if IE 6 or less is encountered.
>>
>> 1. I'm using a framework and so calls to all pages go through index.php
>> 2. The code that checks for IE 6 or less and redirects is in index.php
>>
>> I know how to redirect the users but what I want to do is redirect a user
>> ONLY the first time the web site is accessed regardless of what page they
>> first access. I would like to minimize overhead (no database). Can this
>> be
>> done?
>>
>> Thanks,
>> Don
>>
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
> Probably the best way I could think of would be to set a cookie on their
> computer that you check for when they come and redirect based on that
> cookie.
>
> It's not completely fail proof because all they have to do is clear
> cookies
> and they will see it again but it should work for most people.
> Well, there is that ... and if the browser does not accept your
> cookie, it will be trapped in an infinte redirection cycle.
> Andrew
Yes and from php.net,
"Cookies will not become visible until the next loading of a page that the
cookie should be visible for."
So there's no PHP solution for my problem? I think I need to use unreliable
JavaScript.