WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Multiple URL's or Sub-Domains in Cookie? (6 posts)

  1. macwise
    Member
    Posted 7 years ago #

    I am currently having a problem where when I log in to wordpress (or bbpress) at url:myurl.com, then click a link that is directed to http://www.myurl.com, then I am no longer logged in. (Cookie issues). I am trying to figure out how to define either *.babyquestions101.com (preferably), or if that won't work then babyquestions101.com AND http://www.babyquestions101.com.

    Give it a shot here:
    http://babyquestions101.com/
    and the forum is here:
    http://babyquestions101.com/forum/

    PLEASE CREATE ANY ACCOUNTS WITH THE WORD "TEST" AND ANOTHER WORD/NAME IN THE ACCOUNT NAME, UNLESS YOU INTEND TO KEEP THE ACCOUNT.

  2. moshu
    Member
    Posted 7 years ago #

    As for WP: what are the two URI values in admin > Options > General? With or without www ?

  3. macwise
    Member
    Posted 7 years ago #

    They are listed WITH www. I am digging into mod_rewrite directives, but to be honest, I'm not really grasping it. Right when I think I have it figured out, it throws me. I have been able to get requests going to http://babyquestions101.com to redirect to http://www.babyquestions101.com/ using mod_rewrite in the .htaccess files. However, when I try it out in the forums, (http://babyquestions101.com/forum/) it just resolves at that address, and doesn't insert the www. Any ideas?

  4. drmike
    Member
    Posted 7 years ago #

    Try it without. If you do it without the www, both with and without will work. If you do it with the www bit, it's then required. Ditto for the cookie generating. Best to leave it out.

  5. macwise
    Member
    Posted 7 years ago #

    Hmm....Thank you for the reply. I have tried it without the "www", but it still had the same logged-in-status problems. I just tried it again to make sure, but it seems to be problematic still.

    Basically, if I log in at myurl.com, then once I remove the "www." from the address bar and hit enter it refreshes the page with my status being logged out, (and vice-versa). This behavior is present in both WordPress and BBPress.

    My first choice for a solution would be to add both "www.myurl.com" and "myurl.com" to the cookie, so no matter where they go, wp and bb recognize them. However, that seems to be a solution for which no one has an answer.

    In lieu of that, I would like to forward everybody from "myurl.com" to "www.myurl.com" This seems a little hackerly to me, and it seems like there should be a simple solution for subdomains, but I have not been able to find it if it exists. I could REALLY use some help finding an appropriate solution here.

    Thanks

  6. macwise
    Member
    Posted 7 years ago #

    Sorry for the delayed reply. Here is the info that allowed me to set any sub-domain of my domain to be recorded in the cookie automatically. Hope this helps someone else. This doesn't seem to be documented anywhere else. Look toward the end of the files

    FOR WordPress:
    http://bbpress.org/forums/topic/780?replies=8

    FOR BBPress:
    http://bbpress.org/forums/topic/798?replies=4

    Ron

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.