Php 在没有404的情况下正确安装Wordpress内部导轨?
我有一个Rails站点,我想在/public目录中安装Wordpress 我这样做了,它工作得很好,除了当我点击一篇文章时,它是404。看 我怎样才能防止它被破坏?我假设我必须添加一条路线Php 在没有404的情况下正确安装Wordpress内部导轨?,php,ruby-on-rails,wordpress,Php,Ruby On Rails,Wordpress,我有一个Rails站点,我想在/public目录中安装Wordpress 我这样做了,它工作得很好,除了当我点击一篇文章时,它是404。看 我怎样才能防止它被破坏?我假设我必须添加一条路线 我正在使用Apache和Passenger。您可以在VirtualHost中为特定位置禁用Passenger 比如说 <Location /your/railsfolder/path/public/blog> PassengerEnabled off </Location> 乘
我正在使用Apache和Passenger。您可以在VirtualHost中为特定位置禁用Passenger 比如说 <Location /your/railsfolder/path/public/blog> PassengerEnabled off </Location> 乘客逃走了
您可能还想对目录指令做些什么。:) 我认为你不必对铁路线路做任何特别的事情。我有一个Rails 2.3.8应用程序设置,它就是这样工作的,Rails应用程序本身没有任何特定的内容 我假设wordpress博客位于
public/blog
您应该能够在public/blog/.htaccess
中添加PassengerEnabled Off
您还需要检查Wordpress设置,并确保
Wordpress地址
和博客地址
URL都指向在.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>
重新启动发动机
重写库/博客/
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/blog/index.php[L]
您是如何托管这些应用程序的?Apache?使用Apache和Passenger托管。我已经尝试过此处解释的PassengerEnabled-Off vhost设置,但这不起作用。