本文介绍了Zend框架和Word preSS集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们必须在主办ourdomain.com现有的Zend框架的网站,一个字preSS的博客blog.ourdomain.com

We have an existing Zend Framework site hosted at ourdomain.com and a wordpress blog at blog.ourdomain.com

我们想在博客进入网站迁移的ourdomain.com/blog - 但我似乎已经GOOGLE上搜索到了地球的尽头,不能找出如何。我曾尝试过各种的.htaccess的东西,建立一个博客控制器,还有一些文字preSS文件等 - 但无济于事。

We want to migrate the blog into the site at ourdomain.com/blog - but I seemed to have googled to the end of the earth and cannot find out how. I have tried various .htaccess stuff, setting up a blog controller and including some wordpress files, etc - but to no avail.

有没有人有什么想法?

Does anyone have any ideas?

虚拟主机设置

ServerAdmin [email protected]
DocumentRoot "/Users/bradyeager/Sites/TWPZend/public"
ServerName twps
ErrorLog "logs/twps-error-log"
CustomLog "logs/twps-access_log" common

    选项​​索引了FollowSymLinks

Options Indexes FollowSymLinks

AllowOverride All

Order allow,deny
Allow from all

推荐答案

最有效,最简单的方法来修改你的.htaccess文件,不发送任何与 /博客到ZF的应用程序 - 只是通过它传递到Word preSS。字preSS将不得不您的文档根目录里面装的,当然,这个工作,你到底怎么通常会安装它。

The most efficient and easiest way to accomplish this by modifying your .htaccess file to NOT send anything that starts with /blog to the ZF app -- just pass it through to Wordpress. Wordpress would have to be installed inside your document root, of course, for this to work, exactly how you would normally install it.

一个例子:

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]

RewriteRule ^blog - [NC,L]

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

这一切废话关于您的ZF的应用程序创建自定义的控制器,操作和路线,然后通过你的应用程序假冒为Word preSS是绝对荒谬的。你会在执行应用程序引擎的一个完整的调度周期,就转发到另一应用程序?

All this nonsense about creating custom controllers, actions and routes in your ZF app, then passing off to Wordpress via your app is absolutely ridiculous. You'd be executing a full dispatch cycle of your application's engine, just to forward off to another app?

这篇关于Zend框架和Word preSS集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-03 18:56