optimization - How to set a Cookie-Free Domain with WordPress?

I recently set up a WordPress site here.I added these two lines in wp-config.php: define("COOKIE_DOMAIN", &qu

I recently set up a WordPress site here. I added these two lines in wp-config.php:

define("COOKIE_DOMAIN", "www.artisanplombier-pascher");
define("WP_CONTENT_URL", "");

When I request the homepage and inspect the network queries with my browser, the assets are loaded with "static" subdomain, however a "cookie" header request is also sent along with the other parameters.

I don't know what I am missing.

I recently set up a WordPress site here. I added these two lines in wp-config.php:

define("COOKIE_DOMAIN", "www.artisanplombier-pascher");
define("WP_CONTENT_URL", "https://static.artisanplombier-pascher/wp-content");

When I request the homepage and inspect the network queries with my browser, the assets are loaded with "static" subdomain, however a "cookie" header request is also sent along with the other parameters.

I don't know what I am missing.

Share Improve this question asked Jun 13, 2017 at 17:50 AFA MedAFA Med 1831 silver badge9 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 3

Your mistake is the WP_CONTENT_URL's postfix. You should set the definitions in the following manner:

define("COOKIE_DOMAIN", "www.artisanplombier-pascher");
define("WP_CONTENT_URL", "https://static.artisanplombier-pascher");

Then, you should configure the static. subdomain's path in your server's configuration file or your hosting's control panel. Create a subdomain named "static" or something similar and configure its path to your (WordPress) website's "wp-content" folder.

And finally, you need to check the following redirects:

https://static.artisanplombier-pascher -> is path to -> https://www.artisanplombier-pascher/wp-content

and your "upload" folder (images folder for wp) is here;

https://static.artisanplombier-pascher/uploads/image.jpg

and it's root domain path is;

https://www.artisanplombier-pascher/wp-content/uploads/image.jpg

Best Regards.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745294106a4621037.html

相关推荐

  • optimization - How to set a Cookie-Free Domain with WordPress?

    I recently set up a WordPress site here.I added these two lines in wp-config.php: define("COOKIE_DOMAIN", &qu

    5小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信