redirection when exiting the page

Discussion in 'PHP' started by wasabi8899, Aug 27, 2008.

  1. #1
    Hi

    Is there any way to code a script to automatically redirect another url when people are exiting my site (Ex: Back button, type and another domain name in the address bar, etc...) ?

    thx
     
    wasabi8899, Aug 27, 2008 IP
  2. Spawny

    Spawny Well-Known Member

    Messages:
    252
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    110
    #2
    if it's really possible it will be hell lot annoying
     
    Spawny, Aug 27, 2008 IP
  3. pmpserver

    pmpserver Active Member

    Messages:
    700
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #3
    You can't do it. When user exit your site, you can get this via onunload
    You can call your_function() when user exit your website, but in your_function() you don't call a function automatically redirect another url (ex: location.href='').
     
    pmpserver, Aug 27, 2008 IP