如何在Zend Framework中实现独立应用程序? [英] How to implement a standalone app in Zend Framework?

查看:59
本文介绍了如何在Zend Framework中实现独立应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Zend中实现IP.Board(这是一个论坛应用程序:http://www.invisionpower.com/apps/board/),但它不是一个模块,它有自己的代码并自行运行。我怎样才能建立到该目录的路径,所以它可以自己开始运行?



我打算把论坛放到Zend里面一个名为forum的目录里应用程序,并将它在同一个域上连接到以/ forum开头的URL。



我的.htacess:

RewriteEngine On

#以下规则告诉Apache如果请求的文件名

#存在,只需提供它。

RewriteCond%{REQUEST_FILENAME} -s [OR]

RewriteCond%{REQUEST_FILENAME} -l [OR]

RewriteCond%{REQUEST_FILENAME} -d

RewriteRule ^。* $ - [NC,L ]

#以下内容将所有其他查询重写为index.php。

#条件确保如果您使用Apache别名来执行

#mass虚拟主机,则基本路径将被添加到

#允许正确解析index.php文件;它也适用于非别名环境中的
#,提供安全的单一尺寸

#适合所有解决方案。

RewriteCond% {REQUEST_URI} :: $ 1 ^(/。+)(。+):: \ $ $

RewriteRule ^(。*) - [E = BASE:%1]

RewriteRule ^(。*)$%{ENV:BASE} index.php [NC,L]

I want to implement IP.Board (which is a forum application: http://www.invisionpower.com/apps/board/) in Zend, but it's not a module, it has its own code and runs by itself. How can I make a route to that directory, so it can just start functioning on its own?

I plan to put the forum into a directory called forum inside the Zend app, and connect it on the same domain to a URL beginning with /forum.

My .htacess:
RewriteEngine On
# The following rule tells Apache that if the requested filename
# exists, simply serve it.
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
# The following rewrites all other queries to index.php. The
# condition ensures that if you are using Apache aliases to do
# mass virtual hosting, the base path will be prepended to
# allow proper resolution of the index.php file; it will work
# in non-aliased environments as well, providing a safe, one-size
# fits all solution.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]

推荐答案

- [NC,L]

#以下内容将所有其他查询重写为index.php。

#条件确保如果您使用Apache别名来执行

#mass虚拟主机,则基本路径将被添加到

#允许正确解析index.php文件;它也适用于非别名环境中的
#,提供安全的单一尺寸

#适合所有解决方案。

RewriteCond% {REQUEST_URI} ::
- [NC,L]
# The following rewrites all other queries to index.php. The
# condition ensures that if you are using Apache aliases to do
# mass virtual hosting, the base path will be prepended to
# allow proper resolution of the index.php file; it will work
# in non-aliased environments as well, providing a safe, one-size
# fits all solution.
RewriteCond %{REQUEST_URI}::


1 ^(/。+)(。+):: \ 2
1 ^(/.+)(.+)::\2




RewriteRule ^(。*) - [E = BASE:%1]

RewriteRule ^(。*)

RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)


这篇关于如何在Zend Framework中实现独立应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆