Re: Cookie Redirect Script
- From: Alan Little <alan@xxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 17 Aug 2005 13:18:52 -0500
Carved in mystic runes upon the very living rock, the last words of
<no@xxxxxxxx> of comp.lang.javascript make plain:
> On my website, I get quite a bit of 404 traffic. What I was looking
> for is the first time a surfer goes to the 404 page, it will redirect
> the user to http://www.page1.htm. At the same time, it would place a
> cookie on his pc.
>
> Should the user come back and get a 404 page within X hours (A number
> I'd configure), the second time, he would be redirected to
> http://www.page2.htm. If he came back a third time, he would go to
> http://www.page3.htm.
Something like:
(1x) Sorry, that page isn't here.
(2x) Sorry, that page *still* isn't here, and won't be any time soon.
(3x) WHAT, ARE YOU %##$^&$# STUPID!? THE PAGE ISN'T HERE!!!!
:)
Make your 404 page a page which just checks the cookie, sets or updates
it as needed, and then sets window.location accordingly.
Although you're probably better off doing this with server-side
scripting, or with mod_rewrite if you're using Apache.
--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
.
- References:
- Cookie Redirect Script
- From: --------
- Cookie Redirect Script
- Prev by Date: Re: Getting source from adjacent frame
- Next by Date: I am having trouble with finding a good regular expression
- Previous by thread: Cookie Redirect Script
- Next by thread: Styles not being applied
- Index(es):
Relevant Pages
|