最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

network admin - Getting stylesheet error after setting subdomain to false in multisite

programmeradmin0浏览0评论

I have installed a multisite wordpress and had news.mysite as a secondary website. I want to change the address to mysite/news. To do so, I changed wp-config.php to:

define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'mysite');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

I also changed the .htaccess to:

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

Which is what I've found in Network Admin -> Settings -> Network Setup

I created a new site at /news. The website is accessible but it doesn't load stylesheets properly. I get the following error: Resource interpreted as Stylesheet but transferred with MIME type text/html: "<URL>". and Uncaught SyntaxError: Unexpected token '<' jquery.min.js?ver=3.5.1:1

If I go to the old address: news.mysite it displays correctly and there is no error in the console.

What am I missing here?

发布评论

评论列表(0)

  1. 暂无评论