Cooki Domain for subdomains except static.itstar.ir

hi dear
i am using wordpress multisite 4.1
and i have created 2 blog on :
http://www.itstar.ir
tuts.itstar.ir (for coursepress)

and also i am using CDN acount from CDNsun.com .
i have made a subdomain (static.itstar.ir) for my static content and connected this subdomain to cdnsun.com with W3 total cache

how can i use cookie_domain for my site when i define cooki domain :

define('COOKIE_DOMAIN', 'itstar.ir');

i can not login to tuts.itstar.ir and give an error : cookie not enable on browser .

how can i set cookie_domain to both http://www.itstar.ir and tuts.itstar.ir and prevent cooki from static.itstar.ir (my cdn content)?

  • Tyler Postle

    Hey iTstar,

    Hope you're doing well today!

    Can you define the domain like this:

    define('COOKIE_DOMAIN', '.itstar.ir');

    That should include the tuts subdomain so you can login. Is static inside your WordPress installation?

    You may want to ask your web host on this one too, they may be able to help further from the server side - WordPress cookie define doesn't allow for multiple domain defines.

    Let me know what you think here iTstar, more than happy to help you reach a solution here :slight_smile:

    Look forward to hearing back.

    Cheers,
    Tyler

  • iTstar

    thanks a lot no static.itstar.ir is a cname to my cdnsun.com handle :
    for example : 1234567.r.cdnsun.com .
    i am using gerneric mirror from W3 Total Cache for cdn features and i have made a cname (static.itstar.ir) to my cdnsun.com handle and my statsic content will serive from cdnsun.com hosts.

    i have a problem when i use minify by w3 total cache the css and js files of tuts.itstar.ir dont loaded from cdn and just pics loaded from static.itstar.ir.

    what is the problem?

    when i set
    define('COOKIE_DOMAIN', '.itstar.ir');

    the problem is not login to tuts.itstar.ir blog . like past

  • Tyler Postle

    Hey iTstar,

    Hope you're doing well today and apologies for the delay here!

    i have a problem when i use minify by w3 total cache the css and js files of tuts.itstar.ir dont loaded from cdn and just pics loaded from static.itstar.ir.

    If you turn off minify does it work properly? Minify can often cause conflicts, it may be best to leave it off in this case.

    and a question how can i enable registering to my bloges from user but prevent theme from making new blogs on my network?

    You want users to be able to register but you don't want them to be able to register a site on your network? You can do this from your network settings via:

    Network admin > Settings > Settings.

    Hope this helps! Look forward to hearing back.

    Cheers,
    Tyler

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.