brophp怎样隐藏index.php文件的扩展名

2025-05-09 09:15:09
推荐回答(2个)
回答1:

你的要求只能通过伪静态来实现

添加伪静态规则

RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]

这样 你访问 http://你的域名/action/page/1

就自动解析到 http://你的域名/index.php/action/page/1

回答2:

你把服务器上的默认文档 设置成 index.php 就可以