Support » Plugins and Hacks » Can cookies be turned off or renamed to my choice?

Can cookies be turned off or renamed to my choice?

  • i’m having third-party cookie problems because my blog’s URI is different from the wordpress installation location so IE 6 w. default settings makes it impossible for anyone to log in unless they add installation location (not the blog’s URL) to their trusted sistes list, which seems very unprofessional for me to expect. yes, i tried giving a different blog URL and wordpress installation under Options but when i set the blog URL to what it is, the CSS files would not be processed and the blog lost all its formatting. the loss of CSS happened on a clean install with my blog’s domain name pointing to a blog subfolder on my main web site. since WP allowed the two locations to be different, i thought it would save me effort by onlyu having to maintain one web server.

    anyway, that’s the background. so now i’ve been unsuccessful in implementing a compact privacy policy for the WP installation and it may be eaiser to solve the cookie problem by either 1) turning them off completely, or 2) forcing WP to name the cookie the same as the domain name for the blog instead of naming them as http://www.myhostname.com/blog1, which looks nothing like my blog name and seems very unproffessional for a programmer.

    1) can cookies be turned off without modifying numerous PHP files?

    2) i found the /wp-includes/vars.php file that sets these variables and tried to change SITECOOKIEPATH to blogname (the blog’s fully qualified domain name that points to the subfolder) instead of siteurl (wordpress install location). The mod below was undone after it didn’t help anything.
    // Path for cookies
    define(‘COOKIEPATH’, preg_replace(‘|https?://[^/]+|i’, ”, get_settings(‘home’) . ‘/’ ) );

    //define(‘SITECOOKIEPATH’, preg_replace(‘|https?://[^/]+|i’, ”, get_settings(‘siteurl’) . ‘/’ ) );
    define(‘SITECOOKIEPATH’, preg_replace(‘|https?://[^/]+|i’, ”, get_settings(‘blogname’) . ‘/’ ) );

    What is the difference between COOKIEPATH and SITECOOKIE PATH?

    I’m not afraid to hard-code these variable assignments to point to the domain name of the blog, http://www.maccs2support.com . Question: if i “spoof” the cookie name so that it’s the same as the domain name they went to and shows up in the address bar, would IE6 detect the ruse and still consider it a third-party cookie? Basically, i have a registered domain name that’s just for the blog and it points to my hostname/htdocs/blog1 subfolder. I want my visitors to see the blog’s name as the domain they went to and iwant the cookies to be named for the blog’s name and not show up as third-party cookies.

    I’ve used Google for many hours and am amazed that there seems to be no information on how to solve the “enable referrer” and “third-party cookie rejection problems (which are caused by the same thing, really) without deleting cookies and adding the blog to IE 6’s Trusted Sites list.

    There has to be a way to solve this problem and i can hack the PHP but don’t want to change 20+ files.

    I’ve had to hack WP so much that i’m going to be staying with it for a long time.

    I’ve had to hack WP to put my blogname in several places because i have to specify my WP installation locations for both those fields of Options because when i specified my blogname as the blogname for that screen, CSS stopped working for both admin and blog display and everything was in plain text on the left margin.

Viewing 1 replies (of 1 total)
  • No luck changing vars.php. None of these changes let me log in with IE6 default security settings:
    // Changing path for cookies so that they are based on same URI as the blog’s domain name
    define(‘COOKIEPATH’, preg_replace(‘|https?://[^/]+|i’, ”, get_settings(‘home’) . ‘/’ ) );
    //define(‘COOKIEPATH’, preg_replace(‘|https?://[^/]+|i’, ”, ‘http://www.maccs2support.com’ . ‘/’ ) );
    //define(‘COOKIEPATH’, preg_replace(‘|https?://[^/]+|i’, ”, ‘http://maccs2support.com’ . ‘/’
    //define(‘COOKIEPATH’, preg_replace(‘|https?://[^/]+|i’, ”, ‘www.maccs2support.com’ . ‘/’

    //define(‘SITECOOKIEPATH’, preg_replace(‘|https?://[^/]+|i’, ”, get_settings(‘siteurl’) . ‘/’ ) );
    define(‘SITECOOKIEPATH’, preg_replace(‘|https?://[^/]+|i’, ”, ‘http://www.maccs2support.com’ . ‘/’ ) );
    define(‘SITECOOKIEPATH’, preg_replace(‘|https?://[^/]+|i’, ”, ‘http://maccs2support.com’ . ‘/’ ) );
    define(‘SITECOOKIEPATH’, preg_replace(‘|https?://[^/]+|i’, ”, ‘www.maccs2support.com’ . ‘/’ ) );

Viewing 1 replies (of 1 total)
  • The topic ‘Can cookies be turned off or renamed to my choice?’ is closed to new replies.