2013-06-05 56 views
1

我有一个WordPress安装在AWS上的Ubuntu,它安装在/ var/WWW/固定链接不上嵌套WordPress的工作,安装

现在我试图帮助部分添加到我的网站,我想使用不同的主题,所以我必须安装WP的另一个副本,我已经把它放在/ var/www/help/

一切工作正常与默认URL(?page_id = XX),但当我在设置发布名称的固定链接,网站中断。现在,当进入一个页面或一篇文章时,我得到了一个404主站点 - 而不是嵌套安装。

任何想法为什么?

谢谢!

/etc/apache2/httpd.conf

<Directory /> 
    Options FollowSymLinks 
    RewriteEngine On 
    Options FollowSymLinks 
    AllowOverride All 
    RewriteBase/
    RewriteRule ^index\.php$ - [L] 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteRule . /index.php [L] 
</Directory> 

/var/www/help/.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 
+1

您知道.htacces是Apache的开销吗?如果你有权访问httpd.conf,那么写入所有内容。 – DaGardner

+0

我用你的提示,这实际上解决了我的问题!谢谢 –

回答

1

发现使用基督教Gartner的提示解决方案 - 删除的.htaccess从/ var/www/help /并将/etc/apache2/http.conf更改为以下内容:

<Directory /var/www/> 
Options FollowSymLinks 
RewriteEngine On 
Options FollowSymLinks 
AllowOverride All 
RewriteBase/
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L] 
</Directory> 

<Directory /var/www/help/> 
RewriteEngine On 
RewriteBase /help/ 
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /help/index.php [L] 
</Directory> 

这解决了我的问题。