简体   繁体   中英

Wordpress Multisite with Subdirectories issue

I'm trying to set up a WordPress Multisite using subdirectories and I get a problem.

After I set up a Multisite in admin panel, following instructions, I edited two files on my server, 'wp-config.php' and '.htaccess'.

My .htaccess file looks like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
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]
</IfModule>
# END WordPress

After that I updated page and here's how they look like:

Site Page

In console there's a whole bunch of "Failed to load resource" errors

Somehow it tries to load all the files from 'localhost' rather than from server. How can I fix this problem?

我通过将“ wp-options”表中的值从“ localhost”更改为实际站点域来解决此问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM