【问题标题】:WordPress Multi-site Migration Showing 404 error on subpagesWordPress 多站点迁移在子页面上显示 404 错误
【发布时间】:2017-02-17 20:42:36
【问题描述】:

我将我的多站点迁移到我的活动域,现在它只向我显示主页,但没有一个链接在该页面上工作,因为他们向我显示[子域站点也不起作用]

找不到

在此服务器上找不到请求的 URL /page-url/。

此外,在尝试访问时遇到 404 Not Found 错误 使用 ErrorDocument 来处理请求。

我尝试使用永久链接开关,但没有成功。

我的.htaccess 如下所示

# Block the include-only files.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^wp-admin/includes/ - [F,L]
RewriteRule !^wp-includes/ - [S=3]
RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
RewriteRule ^wp-includes/theme-compat/ - [F,L]
</IfModule>

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]

有什么帮助吗?

【问题讨论】:

    标签: php wordpress .htaccess


    【解决方案1】:

    迁移站点时,您是否更改了数据库中的 http 引用?通常情况下,它不会更改或丢失,迁移的数据库可以说 xyz.com/ 作为页面,当您从多站点迁移它时,您将其更改为 abc.com/。但是数据库仍然有 xzy.com/ 这为什么当它查找 abc.com/ 时它没有找到它。

    如果这有帮助,请评价我的回答。

    【讨论】:

    • 没有,数据库中的http引用没有变化
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-14
    • 1970-01-01
    • 1970-01-01
    • 2017-07-17
    相关资源
    最近更新 更多