带有子域的Wordpress永久链接问题

问题描述 投票:0回答:1

我的设置:我让domain.com指向服务器1,并设置blog.domain.com指向另一个托管多个wordpress网站的wordpress Server 2。根据these指令,服务器2在单个Ubuntu服务器中具有多个wordpress站点。由于本手册已过时,因此我还将根据this帖子中详细介绍的步骤4遵循wordpress虚拟主机配置。请先描述一下我的设置,因为我不确定我的问题是否是因为此设置。

问题:

基于此设置,Wordpress可以使用默认的永久链接选项正常工作。以下是我的conf文件中的详细信息

DocumentRoot /var/www/domain
ServerName blog.domain.com
ServerAlias blog.domain.com
<Directory "/var/www/domain">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
</Directory>

[当选择了普通的永久链接时,我的/ var / www / domain中的htaccess文件为空,并且一切正常。但是,当我将永久链接更改为Post name(blog.domain.com/sample-post/)主页时( blog.domain.com)工作正常,但我的帖子网址(blog.domain.com/sample-post/)无法正常工作。我的htaccess文件如下所示:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

WordPress地址(URL)= blog.domain.com网站地址(URL)= blog.domain.com

您能帮助解决这个问题吗?我希望启用永久链接,但是这个问题已经困扰了几个月。非常感谢您的所有评论和反馈。

wordpress .htaccess http-status-code-404 subdomain permalinks
1个回答
0
投票

我能够按照此线程中罗伯特的说明来解决此问题-WordPress Multisite 404 error on posts and subsites

© www.soinside.com 2019 - 2024. All rights reserved.