duanlian1320 2014-03-11 11:01
浏览 165

URL使用PHP路由器重写

I don't using Zend framework, but I found in bootstrap.php file there is the code:

$configRouter = new Zend_Config_Ini(ROOT_SITE.'/configs/'.SITE_NAME.'/configUrl.ini', 'UrlRewrite');
$routers->addConfig($configRouter,'routes');

ConfigUrl.ini file content:

[UrlRewrite]
routes.index.type = "Zend_Controller_Router_Route_Regex"
routes.index.route = ""
routes.index.defaults.module = "www"
routes.index.defaults.controller = "index"
routes.index.defaults.action = "index"

routes.index_captcha.type = "Zend_Controller_Router_Route_Regex"
routes.index_captcha.route = "captcha.jpg[/]?"
routes.index_captcha.defaults.module = "www"
routes.index_captcha.defaults.controller = "index"
routes.index_captcha.defaults.action = "captcha"

routes.index_download.type = "Zend_Controller_Router_Route_Regex"
routes.index_download.route = "download[/]?"
routes.index_download.defaults.module = "www"
routes.index_download.defaults.controller = "index"
routes.index_download.defaults.action = "download"

And the file .htaccess only per line:

Options +FollowSymLinks

But I don't know how it rewrite urls?

Please help me in this way URL Rewriting using PHP!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 关于#Java#的问题,如何解决?
    • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
    • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
    • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
    • ¥15 cmd cl 0x000007b
    • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
    • ¥500 火焰左右视图、视差(基于双目相机)
    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化