Zend 框架 URL 重定向

发布于 2024-12-24 19:25:17 字数 235 浏览 1 评论 0原文

我正在将旧的遗留网站转换为 zend 框架,但是我将使用 lighttpd 而不是 apache 作为我的 Web 服务器,并且 lighttpd 不支持 .htaccess 文件,我通常会在该文件中添加所有重写,我有几个问题:

  1. 哪里是放置所有这些重写的最佳位置,我们正在讨论近 200 个重定向、lighttpd 配置文件或引导程序?

  2. 就性能而言,哪种方法更好?

I am in the process of converting an old legacy website to zend framework, however I will be using lighttpd instead of apache for my web server and lighttpd doesn't support the .htaccess file which is where I would normally add all my rewrites, I have a couple of questions:

  1. Where is the best place to put all these rewrites, we are talking about close to 200 redirects, lighttpd configuration file or the bootstrap?

  2. Which method would be better as far as performance?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

恍梦境° 2024-12-31 19:25:17

我使用引导程序来完成此操作,但我只重写了 10 次,因此这里唯一的问题是您是否更喜欢将它们放在引导程序中(与您的其他配置一起),并且因为大多数编辑器/IDE 都会让您折叠以下块您的代码管理起来不会有任何问题,或者您可以创建一个单独的文件来执行此操作。

我建议您创建一个单独的文件,特别是如果您的引导程序在开发环境和生产环境中可能有点不同。

I use the bootstrap to do it, but I only had like 10 rewrites, so the only question here is whether you prefer to have them in the bootstrap (with your other config) and since most editors/IDEs will let you collapse the blocks of your code you won't really have a problem managing them, or you can create a separate file to do this.

I would advice you to create a separate file especially if your bootstrap might be a bit different in your development environment and your production one.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文