使用Zend Framework应用程序重定向到Wordpress文件夹

问题描述:

我有一个ZF1.11.12应用程序,位于共享主机上的/ public/blog上的Wordpress安装。我使用的.htaccess重定向与所有请求/公众:使用Zend Framework应用程序重定向到Wordpress文件夹

RewriteEngine On 

# Exclude some directories from URI rewriting 
#RewriteRule ^(dir1|dir2|dir3) - [L] 

RewriteRule ^\.htaccess$ - [F] 

RewriteCond %{REQUEST_URI} ="" 
RewriteRule ^.*$ /public/index.php [NC,L] 

RewriteCond %{REQUEST_URI} !^/public/.*$ 
RewriteRule ^(.*)$ /public/$1 

RewriteCond %{REQUEST_FILENAME} -f 
RewriteRule ^.*$ - [NC,L] 

RewriteRule ^public/.*$ /public/index.php [NC,L] 

在公用文件夹,我使用的是第二的.htaccess指示所有请求的index.php(每标准ZF约定)保存请求到两个目录 -/blog和/ app。代码是如下:

SetEnv APPLICATION_ENV production 
SetEnv MAGIC_QUOTES 0 
RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} -s [OR] 
RewriteCond %{REQUEST_FILENAME} -l [OR] 
RewriteCond %{REQUEST_FILENAME} -d 
RewriteRule ^.*$ - [NC,L] 

RewriteRule ^blog - [NC,L] 
RewriteRule ^app - [NC,L] 

RewriteRule ^.*$ index.php [NC,L] 

似乎一切都只是

  1. 正常,当我浏览到我的WP登录页面(/blog/wp-login.php),它是通过ZF回路由并抛出一个404例外(错误的控制器)
  2. 当我导航到/博客我得到重定向到/博客/博客/但是当我导航到/博客/(随着斜线)我正确地发送博客回家页。所有其他WP帖子的请求都可以正常工作。

更令人困惑的是,我在我的本地环境中访问我的wp登录没有问题。任何帮助,将不胜感激! URL是www.lajollabluebook.com

我目前正在将我们的WP站点与Zend 1.11一起添加。我已将WP网站添加到public/about/(针对我们的案例)。

我没有碰在public/了Zend .htaccess文件(使用的是什么已经在那里了,它没有提到我们的新about迪尔)。

在WP .htaccess文件(public/about/),我编辑RewriteBaseRewriteRule以下几点:

RewriteBase /about/ 
RewriteRule . /about/index.php [L] 

我能到处去我们的网站WP在[URL] /约/ [the-休息-的-WP站点。 我想我不得不删除缓存或饼干或其他的东西(不记得)

希望有所帮助。