2014-09-29 152 views
0

我已经在一个主机中安装了2个wordpress站点。最初我已经将它安装在根文件夹中,出于某种原因,我需要在子文件夹中单独安装另一个WordPress站点,稍后我将在子站点中将其链接。虽然我成功安装了新的wordpress,但是我的htacccess存在问题。htaccess问题与多个wordpress安装在根目录和子目录中

这是我在我的根htaccess的

# Use PHP5.4 as default 
AddHandler application/x-httpd-php54 .php 

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

# END WordPress 

,这里是我的子文件夹htaccess的

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

你是什么意思的“问题”?发生了什么是不可取的? – mydoglixu 2014-09-29 20:24:16

+0

我的根wordpress有永久链接,而访问我的子域网站,它结果404,但主题是应用的,实际上我可以正确访问我的子域/ wp-admin。 – lidongghon 2014-09-29 20:34:39

回答

2

变化

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

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