ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Changing Domains

July 19, 2007 12:19pm

Subscribe [1]
  • #1 / Jul 19, 2007 12:19pm

    dwc55

    1 posts

    I was developing a site at domain1.com, and the client then transferred domain2.com to the same server. Everything worked fine (domain1.com/index.php and domain2.com/index.php were the same) but logging in on domain2.com did not work - on the front end I was given this message: “This page is only accessible to logged-in users with proper access privileges,” and on the back end I couldn’t get past the login screen. Any pages that were restricted by member group were inaccessible on domain2.com.

    I’m using cookies only as my session type — if I change that to sessionID, I can login to the back end and the front end at domain2.com, but the string at the end of the URL (which I’m assuming is how the session ID is passed and so is not optional) is going to cause huge problems with the client, so that’s not a viable solution.

    I changed the system configuration to reflect the new domain and am still having the same problem. I didn’t see any solutions in the docs or the forums — can anyone help? The project is due very soon.

    Thanks

  • #2 / Jul 19, 2007 12:37pm

    Robin Sowell

    13255 posts

    It’s a problem with the cookie setting, though I’ve not faced this particular problem.  The sites are identical- just accessed with two possible domain names?  It’s not a multi-site setup or anything?  Hm- I think I’d try going into ‘Admin- System Prefs- Cookie settings’ and trying it with an empty cookie domain.  The log out, clear all cookies, log back in- see if that helped.  I’m not dead sure it will.

  • #3 / Jul 19, 2007 12:45pm

    dwc55

    1 posts

    Robin,

    Many thanks. It looks like that did the trick. I actually didn’t realize there was a cookie domain setting, so I just had to change it to the new domain. Makes perfect sense.

    Thanks again

  • #4 / Jul 19, 2007 1:03pm

    Robin Sowell

    13255 posts

    Yep- it’s useful and I generally do set a cookie domain.  But I’ve never had it running two distinct urls, which would cause issues.  I think the MSM could run two separate- each with its own cookie domain- no problem.  I’m about to test that out shortly.  But- not quite the same deal.

    Glad it seems to have worked for you!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases