带有子域的Wordpress永久链接问题 [英] Wordpress Permalink Issue w/ Subdomains
问题描述
我的设置:我让domain.com指向服务器1,并设置blog.domain.com指向另一个承载多个wordpress网站的wordpress Server 2.服务器2根据此帖子.预先描述我的设置,因为我不确定我的问题是否是因为此设置.
My setup: I have domain.com pointing to Server 1 and have set up blog.domain.com to point to another wordpress Server 2 that hosts multiple wordpress sites. Server 2 has multiple wordpress sites in a single Ubuntu server as per these instructions. Because this manual is outdated, I also follow wordpress virtual host configuration based on Step 4 detailed in this post. Describing my setup up front because I'm not sure if my problem is because of this setup.
问题:
基于此设置,Wordpress可以使用默认的永久链接选项正常工作.以下是我的conf文件中的详细信息
Based on this setup, Wordpress works fine with the default permalink option. Below are the details in my conf file
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/网络/域我htaccess文件是空的,一切工作fine.However,当我改变了永久链接帖子名称(blog.domain.com/sample-post/)主页(blog.domain.com)正常工作,但我的个人帖子网址(blog.domain.com/sample-post/)无法正常工作.我的htaccess文件如下所示:
When plain permalinks are selected, my htaccess file in /var/www/domain is empty and everything works fine.However, when I change the permalink to Post name (blog.domain.com/sample-post/) the homepage (blog.domain.com) works fine but my individual post url (blog.domain.com/sample-post/) does not work. My htaccess file looks like this:
<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 Address (URL) = blog.domain.com Site Address (URL) = blog.domain.com
能帮您解决这个问题吗?我希望启用永久链接,但是这个问题已经困扰了几个月.非常感谢您的所有评论&反馈.
Could you please help resolve this. I'd like permalinks to be enabled but have been stuck with this issue for several months. Really appreciate all your comments & feedback.
推荐答案
I was able to resolve this by following instructions by Robert in this thread - WordPress Multisite 404 error on posts and subsites
这篇关于带有子域的Wordpress永久链接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!