2011-03-18 85 views
0

我有一個Rails站點,我想在/ public目錄中安裝Wordpress。在沒有404s的Rails里正確安裝Wordpress?

我這樣做,它工作正常,除非我點擊一篇文章,它404s。請參閱http://aromapersona.com/blog/

我該如何避免404錯誤?我假設我必須添加路線。

我使用的是Apache和Passenger。

+0

你如何託管這些應用程序? Apache的? – 2011-03-18 16:58:32

+0

主機與Apache和乘客。 – 2011-03-18 17:03:12

+0

我已經嘗試了PassengerEnabled Off vhost設置,這裏http://forums.site5.com/showthread.php?t=26850解釋,這不起作用。 – 2011-03-18 17:23:10

回答

0

你可以在你的虛擬主機禁止乘客的特定地點 例如

 
<Location /your/railsfolder/path/public/blog> 
    PassengerEnabled off 
</Location> 

你可能想做點什麼目錄指示以及內部。 :)

+0

不幸的是,這並沒有工作:( – 2011-03-18 23:08:24

0

我不認爲你必須做任何具體的Rails路線。我有一個像這樣工作的Rails 2.3.8應用程序設置,Rails應用程序本身沒有任何特定的東西。

我假設wordpress博客坐在public/blog

您應該可以在public/blog/.htaccess內添加PassengerEnabled Off

您還需要檢查你的WordPress的設置,並確保Wordpress addressBlog address網址都指向http://aromapersona.com/blog

+0

謝謝,但是,使用PassengerEnabled關閉沒有工作。 – 2011-03-18 23:07:54

1

什麼結束了在.htaccess文件的工作是這樣的:

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