Wordpress多站点错误-将IP更改为域后

时间:2019-11-21 03:30:35

标签: php wordpress

我想使我的开发站点能够与我的域一起使用。因此,我更改了域的ip开发。

进行更改后,我的网站无法打开:

 Access forbidden!
    You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

    If you think this is a server error, please contact the webmaster.

    Error 403
    ddmc.co.id
    Apache/2.4.39 (Win64) OpenSSL/1.1.1b PHP/7.3.4

服务器:本地服务器 Web服务器:xampp

WP_OPTION

siteurl: ddmc.co.id
home: ddmc.co.id

WP_SITE

domain: ddmc.co.id
path: /

WP_SITEMETA

siteurl: ddmc.co.id

WP_BLOGS

domain: ddmc.co.id path:/
domain: ddmc.co.id path:/id/

wp-config.php

define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'ddmc.co.id');
define('PATH_CURRENT_SITE','/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT', 1);
define('WP_MEMORY_LIMIT', '512M');

htaccess

# BEGIN WordPress
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]

# END WordPress

htpd-vhosts

<Directory "c:/xampp/htdocs/hcml">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Order Deny,Allow
        Allow from all
        Require all granted
</Directory>

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

更改此:

define('SUBDOMAIN_INSTALL', false);

收件人:

define('SUBDOMAIN_INSTALL', true);