Re: Cookie Redirect Script



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/
.



Relevant Pages

  • Re: Accessing and displaying SSL web pages and cookies from a windows form
    ... or LoadXML calls to urls on the website in order to get data or post data to ... first redirected to a SSL login page, if a particular cookie is not present, ... cookie is not present instead of getting the data. ... >> the data in the cookie and also not redirect to the login page. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Accessing and displaying SSL web pages and cookies from a windows form
    ... > I have a website that uses an ISAPI filter that will redirect anyone going ... > cookie and redirected back to the page they initially tried to go to. ... > website and utilizes that SSL login form and the session cookie generated ... > the data in the cookie and also not redirect to the login page. ...
    (microsoft.public.dotnet.languages.vb)
  • Accessing and displaying SSL web pages and cookies from a windows form
    ... I have a website that uses an ISAPI filter that will redirect anyone going ... cookie and redirected back to the page they initially tried to go to. ... website and utilizes that SSL login form and the session cookie generated by ...
    (microsoft.public.dotnet.languages.vb)
  • Re: ANA wesbite problem - I need the forums assistance
    ... This request is only allowed to be processed through the ANA website ... You may want to try accessing the money.org dealer directory from a ... Or you may want to try using an alternate Internet Browser. ... Sounds like a cookie problem I had no problems getting on and they left ...
    (rec.collecting.coins)
  • Re: How to logon and post this to a web form
    ... > to interface with a website. ... > Host: www.betfair.com ... > Connection: Keep-Alive ...
    (microsoft.public.dotnet.languages.vb)