没有 mod_rewrite 的 php Zend/MVC [英] php Zend / MVC without mod_rewrite

查看:28
本文介绍了没有 mod_rewrite 的 php Zend/MVC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网络上的许多博客中都看到过它,但我认为应该在这里讨论它.当我们在 PHP 中有一个 MVC 框架(我对 ZEND 感兴趣)但我们的主机不提供 mod_rewrite 时,我们该怎么办?有什么捷径"吗?我们可以以任何方式转移控制权(以便页面之间可能发生映射)?有任何想法吗?谢谢:-)

I've seen it mentioned in many blogs around the net, but I believe it shoud be discussed here. What can we do when we have an MVC framework (I am interested in ZEND) in PHP but our host does not provide mod_rewrite? Are there any "short-cuts"? Can we transfer control in any way (so that a mapping may occur between pages)? Any ideas? Thank you :-)

推荐答案

Zend 框架应该可以在没有 mod_rewrite 的情况下工作.如果你能忍受你的 URL:s 看起来更像/path/to/app/index.php/controller/action".如果你有 mod_rewrite,你可以去掉index.php"位,但它也应该可以使用.

Zend framework should work without mod_rewrite. If you can live with your URL:s looking more like "/path/to/app/index.php/controller/action". If you had mod_rewrite you could do away with the "index.php" bit, but it should work with too.

设置路由以接受 index.php 部分就是一个问题.

It's all a matter of setting up the routes to accept the index.php part.

这篇关于没有 mod_rewrite 的 php Zend/MVC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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