在没有 404s 的情况下在 Rails 中正确安装 Wordpress? [英] Properly install Wordpress inside Rails without 404s?
本文介绍了在没有 404s 的情况下在 Rails 中正确安装 Wordpress?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个 Rails 站点,我想在/public 目录中安装 Wordpress.
I have a Rails site, and I would like to install Wordpress inside the /public directory.
我这样做了,而且效果很好,除了当我点击一篇文章时,它是 404s.请参阅http://aromapersona.com/blog/.
I did this, and it works fine, except when I click on an article, it 404s. See http://aromapersona.com/blog/.
如何防止 404ing?我假设我必须添加一条路线.
How do I keep it from 404ing? I'm assuming I have to add a route.
我正在使用 Apache 和Passenger.
I'm using Apache and Passenger.
推荐答案
最终在 .htaccess 文件中起作用的是:
What ended up working was this in a .htaccess file:
<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>
这篇关于在没有 404s 的情况下在 Rails 中正确安装 Wordpress?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文