Zend 框架路由:.html 扩展名 [英] Zend Framework Routing: .html extension

查看:35
本文介绍了Zend 框架路由:.html 扩展名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我以前见过这样做过,但我在任何地方都找不到相关信息.我需要能够在 Zend 框架中使用 .html 扩展名进行路由.

I know I've seen this done before but I can't find the information anywhere. I need to be able to route with .html extensions in the Zend Framework.

I.E./controller/action.html 应该路由到适当的控制器/动作.

I.E. /controller/action.html should route to the appropriate controller / action.

我们有一个想法,用我们的 .htaccess 文件丢弃 .html 扩展名,但我认为更改路由配置将是更好的解决方案.

We have an idea to throw away the .html extension with our .htaccess file but I think changing the route config would be the better solution.

欢迎任何建议.

推荐答案

在 google 上快速搜索得到以下教程:

A quick search on google yielded the following tutorials:

扩展 Zend 框架路由和路由器以实现自定义路由
Zend Framework 中的路由和复杂 URL

这篇关于Zend 框架路由:.html 扩展名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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