No announcement yet.

Simple redirect from to

  • Filter
  • Time
  • Show
Clear All
new posts

  • Simple redirect from to

    I searched the forum for this answer, but couldn't find it, so I'm not sure if anyone has ever posted it.

    For some reason, if I go into options and set my cookie domain to the cookies get royally screwed up and no one is able to log out. The only reason I'd want to set the cookies like this would be so the cookie is recognizable at both and

    As doing things that way doesn't seem to work for me, my only other alternative is to just automatically redirect users visiting to (I noticed it's done on the page)

    I did some searching and some suggested to place it in the global.php, however this doesn't work for me at all. So I went into my templates and placed the following inside the pminclude template (one I've found VERY valuable!!)

    Just thought I'd share in case anyone else is having this problem or seeking this solution. Here's the code, I just placed it at the top of the pminclude template:

    PHP Code:
    $thisroot $HTTP_SERVER_VARS['HTTP_HOST'];
    $thisphp_self $_SERVER['PHP_SELF'];

    if (
    substr($thisroot,0,4) != "www.")