www.webdeveloper.com
Results 1 to 3 of 3

Thread: [RESOLVED] Overriding PHP redirect to welcome page when request is from newsletter

  1. #1
    Join Date
    Jul 2007
    Posts
    245

    resolved [RESOLVED] Overriding PHP redirect to welcome page when request is from newsletter

    I've created a website in which on first access, even if you type or click on a link to a URL which is not the home page, you're redirected to the typical welcome page with a big image. Then a cookie is created, and as long as it doesn't expire, you will access any other page in the web without this redirect.

    The problem comes when we send a newsletter. I've stumbled across a stupid issue I didn't foresee. The links in the newsletter to specific pages didn't work as expected in most cases obviously.

    The first, and only, workaround I've figured out so far is to add a variable to the newsletter links in order to override the redirection.

    However I don't know what's generally done in this case. Do I use some static key? How do websites generally do in cases like this? or what would you think would be a good way?

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,241
    Of course, you could ditch the whole redirect issue and let people surf to wherever they want to surf. E.g.: what happens if Google points to an internal page of your site for some search result, a user clicks their link, they end up getting redirected to a banner page that has nothing to do with what they were searching for, and then leave your site?

    Anyway, if you're going to stick with that behavior, my first thought was the query string variable in the newsletter link, too.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Jul 2007
    Posts
    245

    Thumbs up

    Quote Originally Posted by NogDog View Post
    Of course, you could ditch the whole redirect issue and let people surf to wherever they want to surf. E.g.: what happens if Google points to an internal page of your site for some search result, a user clicks their link, they end up getting redirected to a banner page that has nothing to do with what they were searching for, and then leave your site?

    Anyway, if you're going to stick with that behavior, my first thought was the query string variable in the newsletter link, too.
    mmm, yes, most probably this is self-defeating. I think I will restore it to just as it was at first when I designed it: the redirect only happened from the homepage to the welcome page (when there was no cookie of course).

    Thanks for enlighten me!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles