Cookie Free Domain Doesn't work

2019-09-08 20:03发布

问题:

I was following this tutorial: http://www.xpertdeveloper.com/2011/07/wordpress-cookie-free-domain/

So, I created (CPANEL) the subdomain static.artswr.com and redirected it to artswr.com/wp-content/

I edited and add the following in the end of the wp-config file:

define("WP_CONTENT_URL", "http://static.artswr.com");
define("COOKIE_DOMAIN", "www.artswr.com");

I am loading everything with <?php bloginfo('template_directory'); ?> but its not working, also I'm getting 404 errors when I try to find a file in static.artswr.com

回答1:

Instead of

define("WP_CONTENT_URL", "http://static.artswr.com");

Try

define("WP_CONTENT_URL", "http://static.artswr.com/wp-content");

without any redirections from your cpanel. static.artswr.com should point to artswr.com



回答2:

check below line: So, I created (CPANEL) the subdomain static.artswr.com and redirected it to artswr.com/wp-content/

You mentioned that you have redirected, but it should not be redirect, It should map to wp-content folder. Let me know if any comments.