2013-06-05 97 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> 

這解決了我的問題。