Welcome to WebmasterWorld Guest from 22.214.171.124
I am looking for some sort of a redirect that will not allow the user to go back.
Lets say the user clicks a banner on Domain1.com
I want that banner to go through a redirect and land on Domain2.com
If the user hits back I want them to not go back to domain1.com. I want to either push them back to domain2.com or send them to a completely different domain; domain3.com
How can I accomplish this?
So you would set up a redirect page that your banners post to. Then when users click a banner from Domain1.com... that will result in a post to your redirect page make sure you pass in values came_from and going_to, in this case "came_from=Domain1.com" and "going_to=Domain2.com"
When the request comes into the redirect page simply check the going_to page and force a redirect from this page to the going_to page.
If the user hits back it will repost the form data and they will get redirected back to Domain2.com
If you want to do a redirect to Domain3.com if they hit back then just add in code that checks to see if came_from equals the referrer.... if they hit back it won't and you can redirect to Domain3.com
[edited by: Demaestro at 7:50 pm (utc) on Oct. 7, 2008]
If not, then gs1md is right. Do not mess with browser functions such as the back button or no one will be coming back.