2013-10-23 22 views
0

我在linuxmint上使用Lamp服務器,並在其上安裝了一個名爲「bfsite」的2個wordpress平臺,另一個名爲「titus」。我修改了.htacces文件WordPress的建議我做我被困在.htaccess中,並重寫了

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

這一個是bfsite,和我修改了/提多平臺

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

和一個簡單的重定向。

Redirect /index.php http://89.39.166.81/titus 

正如你看到我做了我的locahost在線爲你看到發生了什麼,當我嘗試去

http://89.39.166.81/titus/about 

它返回到我http://localhost/titus/dev/而且,如果你強行與此路徑

http://89.39.166.81/titus/dev/ 

它帶有一個404和頁面未找到的錯誤,但是正在與「bfsite」wordpress平臺。

回答

0

,因爲你是一個Ubuntu的發行版下,你可以使用這個

sudo a2enmod rewrite 

- 那麼你就可以實現從WP後端postname。祝你好運!

+0

模塊重寫已啓用 - >這是我的終端對我的迴應,我認爲我在.htaccess中輸入的代碼正在使衝突問候! –

+0

噢,刪除你在.htaccess中的所有內容,通過終端sudo gedit .htaccess進入bfsite文件夾並粘貼。對於titus文件夾,將「bfsite」下面的代碼替換爲「titus」,並重復此過程! RewriteEngine敘述在 RewriteBase/bfsite/ 重寫規則^索引\ .PHP $! - [L] 的RewriteCond%{REQUEST_FILENAME} -f 的RewriteCond%{REQUEST_FILENAME} -D- 重寫規則。 /bfsite/index.php [L] ciprian

+0

是wotking!謝謝Ciprian –